Consistently use double quotes (even if no interpolation needed)
This commit is contained in:
87
build.gradle
87
build.gradle
@@ -20,20 +20,20 @@ plugins {
|
||||
}
|
||||
|
||||
buildScan {
|
||||
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
|
||||
licenseAgree = 'yes'
|
||||
licenseAgreementUrl = "https://gradle.com/terms-of-service"
|
||||
licenseAgree = "yes"
|
||||
}
|
||||
|
||||
ext {
|
||||
linkHomepage = 'https://projects.spring.io/spring-framework'
|
||||
linkCi = 'https://build.spring.io/browse/SPR'
|
||||
linkIssue = 'https://jira.spring.io/browse/SPR'
|
||||
linkScmUrl = 'https://github.com/spring-projects/spring-framework'
|
||||
linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-framework.git'
|
||||
linkScmDevConnection = 'scm:git:ssh://git@github.com:spring-projects/spring-framework.git'
|
||||
linkHomepage = "https://projects.spring.io/spring-framework"
|
||||
linkCi = "https://build.spring.io/browse/SPR"
|
||||
linkIssue = "https://jira.spring.io/browse/SPR"
|
||||
linkScmUrl = "https://github.com/spring-projects/spring-framework"
|
||||
linkScmConnection = "scm:git:git://github.com/spring-projects/spring-framework.git"
|
||||
linkScmDevConnection = "scm:git:ssh://git@github.com:spring-projects/spring-framework.git"
|
||||
|
||||
moduleProjects = subprojects.findAll {
|
||||
!it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom')
|
||||
!it.name.equals("spring-build-src") && !it.name.equals("spring-framework-bom")
|
||||
}
|
||||
|
||||
aspectjVersion = "1.8.13"
|
||||
@@ -67,15 +67,16 @@ configure(allprojects) { project ->
|
||||
group = "org.springframework"
|
||||
version = qualifyVersionIfNecessary(version)
|
||||
|
||||
apply plugin: "propdeps"
|
||||
apply plugin: "java"
|
||||
apply plugin: "kotlin"
|
||||
apply plugin: "propdeps"
|
||||
apply plugin: "test-source-set-dependencies"
|
||||
apply plugin: "io.spring.dependency-management"
|
||||
apply from: "${gradleScriptDir}/ide.gradle"
|
||||
|
||||
dependencyManagement {
|
||||
resolutionStrategy {
|
||||
cacheChangingModulesFor 0, 'seconds'
|
||||
cacheChangingModulesFor 0, "seconds"
|
||||
}
|
||||
applyMavenExclusions = false
|
||||
generatedPomCustomization {
|
||||
@@ -83,33 +84,16 @@ configure(allprojects) { project ->
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "kotlin"
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
freeCompilerArgs = ["-Xjsr305=strict"]
|
||||
apiVersion = "1.1"
|
||||
languageVersion = "1.1"
|
||||
}
|
||||
}
|
||||
compileTestKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
freeCompilerArgs = ["-Xjsr305=strict"]
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
// Check for updates every build
|
||||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
|
||||
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
|
||||
|
||||
// Consistent slf4j version (e.g. clashes between slf4j versions)
|
||||
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||
if (details.requested.group == 'org.slf4j') {
|
||||
if (details.requested.group == "org.slf4j") {
|
||||
details.useVersion slf4jVersion
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
def commonCompilerArgs =
|
||||
@@ -122,22 +106,38 @@ configure(allprojects) { project ->
|
||||
"-Xlint:deprecation", "-Xlint:unchecked", "-Werror"]
|
||||
|
||||
compileTestJava.options*.compilerArgs = commonCompilerArgs +
|
||||
["-Xlint:-varargs", "-Xlint:-fallthrough","-Xlint:-rawtypes",
|
||||
["-Xlint:-varargs", "-Xlint:-fallthrough", "-Xlint:-rawtypes",
|
||||
"-Xlint:-deprecation", "-Xlint:-unchecked"]
|
||||
|
||||
compileJava {
|
||||
sourceCompatibility = 1.8 // can be switched to 10 for testing
|
||||
targetCompatibility = 1.8
|
||||
options.encoding = 'UTF-8'
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
compileTestJava {
|
||||
sourceCompatibility = 1.8 // can be switched to 10 for testing
|
||||
targetCompatibility = 1.8
|
||||
options.encoding = 'UTF-8'
|
||||
options.encoding = "UTF-8"
|
||||
options.compilerArgs += "-parameters"
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
freeCompilerArgs = ["-Xjsr305=strict"]
|
||||
apiVersion = "1.1"
|
||||
languageVersion = "1.1"
|
||||
}
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
freeCompilerArgs = ["-Xjsr305=strict"]
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
systemProperty("java.awt.headless", "true")
|
||||
systemProperty("testGroups", project.properties.get("testGroups"))
|
||||
@@ -156,15 +156,15 @@ configure(allprojects) { project ->
|
||||
|
||||
dependencies {
|
||||
testCompile("junit:junit:4.12") {
|
||||
exclude group:'org.hamcrest', module:'hamcrest-core'
|
||||
exclude group: "org.hamcrest", module: "hamcrest-core"
|
||||
}
|
||||
testCompile("org.mockito:mockito-core:2.19.1") {
|
||||
exclude group:'org.hamcrest', module:'hamcrest-core'
|
||||
exclude group: "org.hamcrest", module: "hamcrest-core"
|
||||
}
|
||||
testCompile("com.nhaarman:mockito-kotlin:1.6.0") {
|
||||
exclude module:'kotlin-stdlib'
|
||||
exclude module:'kotlin-reflect'
|
||||
exclude module:'mockito-core'
|
||||
exclude module: "kotlin-stdlib"
|
||||
exclude module: "kotlin-reflect"
|
||||
exclude module: "mockito-core"
|
||||
}
|
||||
testCompile("org.hamcrest:hamcrest-all:1.3")
|
||||
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
|
||||
@@ -221,7 +221,7 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
|
||||
options.header = project.name
|
||||
options.use = true
|
||||
options.links(project.ext.javadocLinks)
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
options.addStringOption("Xdoclint:none", "-quiet")
|
||||
|
||||
// Suppress warnings due to cross-module @see and @link references.
|
||||
// Note that global 'api' task does display all warnings.
|
||||
@@ -231,7 +231,7 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
classifier = 'sources'
|
||||
classifier = "sources"
|
||||
from sourceSets.main.allSource
|
||||
// Don't include or exclude anything explicitly by default. See SPR-12085.
|
||||
}
|
||||
@@ -260,7 +260,7 @@ configure(rootProject) {
|
||||
}
|
||||
}
|
||||
|
||||
// don't publish the default jar for the root project
|
||||
// Don't publish the default jar for the root project
|
||||
configurations.archives.artifacts.clear()
|
||||
|
||||
dependencies { // for integration tests
|
||||
@@ -290,7 +290,7 @@ configure(rootProject) {
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
description = "Generates gradlew[.bat] scripts"
|
||||
gradleVersion = '4.4.1'
|
||||
gradleVersion = "4.4.1"
|
||||
|
||||
doLast() {
|
||||
def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
|
||||
@@ -303,7 +303,6 @@ configure(rootProject) {
|
||||
"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -317,7 +316,7 @@ def qualifyVersionIfNecessary(version) {
|
||||
if (rootProject.hasProperty("BRANCH_NAME")) {
|
||||
def qualifier = rootProject.getProperty("BRANCH_NAME")
|
||||
if (qualifier.startsWith("SPR-")) {
|
||||
return version.replace('BUILD', qualifier)
|
||||
return version.replace("BUILD", qualifier)
|
||||
}
|
||||
}
|
||||
return version
|
||||
|
||||
@@ -25,7 +25,7 @@ include "spring-framework-bom"
|
||||
include "buildSrc"
|
||||
rootProject.children.find{ it.name == "buildSrc" }.name = "spring-build-src"
|
||||
|
||||
rootProject.name = 'spring'
|
||||
rootProject.name = "spring"
|
||||
rootProject.children.each {project ->
|
||||
project.buildFileName = "${project.name}.gradle"
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ description = "Spring AOP"
|
||||
|
||||
dependencies {
|
||||
compile(project(":spring-beans"))
|
||||
compile(project(':spring-core'))
|
||||
compile(project(":spring-core"))
|
||||
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
|
||||
optional("org.apache.commons:commons-pool2:2.5.0")
|
||||
optional("com.jamonapi:jamon:2.81")
|
||||
|
||||
@@ -3,7 +3,7 @@ description = "Spring Beans"
|
||||
apply plugin: "groovy"
|
||||
|
||||
dependencies {
|
||||
compile(project(':spring-core'))
|
||||
compile(project(":spring-core"))
|
||||
optional("javax.inject:javax.inject:1")
|
||||
optional("org.yaml:snakeyaml:1.20")
|
||||
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
|
||||
@@ -25,6 +25,6 @@ compileGroovy {
|
||||
|
||||
// This module also builds Kotlin code and the compileKotlin task naturally depends on
|
||||
// compileJava. We need to redefine dependencies to break task cycles.
|
||||
compileGroovy.dependsOn = compileGroovy.taskDependencies.values - 'compileJava'
|
||||
compileGroovy.dependsOn = compileGroovy.taskDependencies.values - "compileJava"
|
||||
compileKotlin.dependsOn(compileGroovy)
|
||||
compileKotlin.classpath += files(compileGroovy.destinationDir)
|
||||
|
||||
@@ -5,7 +5,7 @@ apply plugin: "groovy"
|
||||
dependencies {
|
||||
compile(project(":spring-aop"))
|
||||
compile(project(":spring-beans"))
|
||||
compile(project(':spring-core'))
|
||||
compile(project(":spring-core"))
|
||||
compile(project(":spring-expression"))
|
||||
optional(project(":spring-instrument"))
|
||||
optional("javax.annotation:javax.annotation-api:1.3.2")
|
||||
|
||||
@@ -10,11 +10,11 @@ dependencies {
|
||||
castor "org.codehaus.castor:castor-anttasks:1.4.1"
|
||||
jibx "org.jibx:jibx-bind:1.3.1"
|
||||
jibx "org.apache.bcel:bcel:6.0"
|
||||
xjc 'javax.xml.bind:jaxb-api:2.3.0'
|
||||
xjc 'com.sun.xml.bind:jaxb-core:2.3.0'
|
||||
xjc 'com.sun.xml.bind:jaxb-impl:2.3.0'
|
||||
xjc 'com.sun.xml.bind:jaxb-xjc:2.2.11' // 2.3.0 breaks with "xjc failed"
|
||||
xjc 'com.sun.activation:javax.activation:1.2.0'
|
||||
xjc "javax.xml.bind:jaxb-api:2.3.0"
|
||||
xjc "com.sun.xml.bind:jaxb-core:2.3.0"
|
||||
xjc "com.sun.xml.bind:jaxb-impl:2.3.0"
|
||||
xjc "com.sun.xml.bind:jaxb-xjc:2.2.11" // 2.3.0 breaks with "xjc failed"
|
||||
xjc "com.sun.activation:javax.activation:1.2.0"
|
||||
}
|
||||
|
||||
ext.genSourcesDir = "${buildDir}/generated-sources"
|
||||
@@ -101,19 +101,19 @@ dependencies {
|
||||
optional("javax.xml.bind:jaxb-api:2.3.0")
|
||||
optional("javax.activation:activation:1.1.1")
|
||||
optional("org.codehaus.castor:castor-xml:1.4.1") {
|
||||
exclude group: 'stax', module: 'stax-api'
|
||||
exclude group: "stax", module: "stax-api"
|
||||
exclude group: "org.springframework", module: "spring-context"
|
||||
exclude group: "commons-logging", module: "commons-logging"
|
||||
}
|
||||
optional("com.thoughtworks.xstream:xstream:1.4.10") {
|
||||
exclude group: 'xpp3', module: 'xpp3_min'
|
||||
exclude group: 'xmlpull', module: 'xmlpull'
|
||||
exclude group: "xpp3", module: "xpp3_min"
|
||||
exclude group: "xmlpull", module: "xmlpull"
|
||||
}
|
||||
optional("org.jibx:jibx-run:1.3.1")
|
||||
testCompile(project(":spring-context"))
|
||||
testCompile("org.ogce:xpp3:1.1.6")
|
||||
testCompile("org.codehaus.jettison:jettison:1.3.8") {
|
||||
exclude group: 'stax', module: 'stax-api'
|
||||
exclude group: "stax", module: "stax-api"
|
||||
}
|
||||
testCompile(files(genCastor.classesDir).builtBy(genCastor))
|
||||
testCompile(files(genJaxb.classesDir).builtBy(genJaxb))
|
||||
|
||||
@@ -74,8 +74,8 @@ dependencies {
|
||||
testCompile("org.apache.httpcomponents:httpclient:4.5.5") {
|
||||
exclude group: "commons-logging", module: "commons-logging"
|
||||
}
|
||||
testCompile('io.projectreactor.ipc:reactor-netty')
|
||||
testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
|
||||
testCompile("io.projectreactor.ipc:reactor-netty")
|
||||
testCompile("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1")
|
||||
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
|
||||
// so that we can run JUnit 4 tests in IntelliJ IDEA.
|
||||
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
|
||||
@@ -87,7 +87,7 @@ dependencies {
|
||||
}
|
||||
|
||||
task testNG(type: Test) {
|
||||
description = 'Runs TestNG tests.'
|
||||
description = "Runs TestNG tests."
|
||||
useTestNG()
|
||||
scanForTestClasses = false
|
||||
include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
|
||||
@@ -98,19 +98,19 @@ task testNG(type: Test) {
|
||||
}
|
||||
|
||||
test {
|
||||
description = 'Runs JUnit tests.'
|
||||
description = "Runs JUnit tests."
|
||||
dependsOn testNG
|
||||
useJUnit()
|
||||
scanForTestClasses = false
|
||||
include(['**/*Tests.class', '**/*Test.class', '**/SpringJUnitJupiterTestSuite.class'])
|
||||
exclude(['**/testng/**/*.*'])
|
||||
include(["**/*Tests.class", "**/*Test.class", "**/SpringJUnitJupiterTestSuite.class"])
|
||||
exclude(["**/testng/**/*.*"])
|
||||
// Java Util Logging for JUnit 5.
|
||||
// systemProperty('java.util.logging.manager', 'org.apache.logging.log4j.jul.LogManager')
|
||||
// systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
|
||||
reports.junitXml.destination = file("$buildDir/test-results")
|
||||
}
|
||||
|
||||
task aggregateTestReports(type: TestReport) {
|
||||
description = 'Aggregates JUnit and TestNG test reports.'
|
||||
description = "Aggregates JUnit and TestNG test reports."
|
||||
destinationDir = test.reports.html.destination
|
||||
reportOn test, testNG
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ dependencies {
|
||||
compile(project(":spring-aop"))
|
||||
compile(project(":spring-beans"))
|
||||
compile(project(":spring-context"))
|
||||
compile(project(':spring-core'))
|
||||
compile(project(":spring-core"))
|
||||
compile(project(":spring-expression"))
|
||||
compile(project(":spring-web"))
|
||||
optional(project(":spring-context-support")) // for FreeMarker support
|
||||
@@ -20,7 +20,7 @@ dependencies {
|
||||
optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
|
||||
optional("javax.el:javax.el-api:3.0.1-b04")
|
||||
optional("javax.xml.bind:jaxb-api:2.3.0")
|
||||
optional('org.webjars:webjars-locator-core:0.35')
|
||||
optional("org.webjars:webjars-locator-core:0.35")
|
||||
optional("com.rometools:rome:1.9.0")
|
||||
optional("com.github.librepdf:openpdf:1.0.5")
|
||||
optional("org.apache.poi:poi-ooxml:3.17")
|
||||
|
||||
Reference in New Issue
Block a user