Skip to content

Commit fb083a3

Browse files
committed
Consistently use double quotes (even if no interpolation needed)
1 parent f532de5 commit fb083a3

File tree

8 files changed

+67
-68
lines changed

8 files changed

+67
-68
lines changed

build.gradle

Lines changed: 43 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ plugins {
2020
}
2121

2222
buildScan {
23-
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
24-
licenseAgree = 'yes'
23+
licenseAgreementUrl = "https://gradle.com/terms-of-service"
24+
licenseAgree = "yes"
2525
}
2626

2727
ext {
28-
linkHomepage = 'https://projects.spring.io/spring-framework'
29-
linkCi = 'https://build.spring.io/browse/SPR'
30-
linkIssue = 'https://jira.spring.io/browse/SPR'
31-
linkScmUrl = 'https://github.com/spring-projects/spring-framework'
32-
linkScmConnection = 'scm:git:git://github.com/spring-projects/spring-framework.git'
33-
linkScmDevConnection = 'scm:git:ssh://[email protected]:spring-projects/spring-framework.git'
28+
linkHomepage = "https://projects.spring.io/spring-framework"
29+
linkCi = "https://build.spring.io/browse/SPR"
30+
linkIssue = "https://jira.spring.io/browse/SPR"
31+
linkScmUrl = "https://github.com/spring-projects/spring-framework"
32+
linkScmConnection = "scm:git:git://github.com/spring-projects/spring-framework.git"
33+
linkScmDevConnection = "scm:git:ssh://[email protected]:spring-projects/spring-framework.git"
3434

3535
moduleProjects = subprojects.findAll {
36-
!it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom')
36+
!it.name.equals("spring-build-src") && !it.name.equals("spring-framework-bom")
3737
}
3838

3939
aspectjVersion = "1.8.13"
@@ -67,49 +67,33 @@ configure(allprojects) { project ->
6767
group = "org.springframework"
6868
version = qualifyVersionIfNecessary(version)
6969

70-
apply plugin: "propdeps"
7170
apply plugin: "java"
71+
apply plugin: "kotlin"
72+
apply plugin: "propdeps"
7273
apply plugin: "test-source-set-dependencies"
7374
apply plugin: "io.spring.dependency-management"
7475
apply from: "${gradleScriptDir}/ide.gradle"
7576

7677
dependencyManagement {
7778
resolutionStrategy {
78-
cacheChangingModulesFor 0, 'seconds'
79+
cacheChangingModulesFor 0, "seconds"
7980
}
8081
applyMavenExclusions = false
8182
generatedPomCustomization {
8283
enabled = false
8384
}
8485
}
8586

86-
apply plugin: "kotlin"
87-
compileKotlin {
88-
kotlinOptions {
89-
jvmTarget = "1.8"
90-
freeCompilerArgs = ["-Xjsr305=strict"]
91-
apiVersion = "1.1"
92-
languageVersion = "1.1"
93-
}
94-
}
95-
compileTestKotlin {
96-
kotlinOptions {
97-
jvmTarget = "1.8"
98-
freeCompilerArgs = ["-Xjsr305=strict"]
99-
}
100-
}
101-
10287
configurations.all {
10388
// Check for updates every build
104-
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
89+
resolutionStrategy.cacheChangingModulesFor 0, "seconds"
10590

10691
// Consistent slf4j version (e.g. clashes between slf4j versions)
10792
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
108-
if (details.requested.group == 'org.slf4j') {
93+
if (details.requested.group == "org.slf4j") {
10994
details.useVersion slf4jVersion
11095
}
11196
}
112-
11397
}
11498

11599
def commonCompilerArgs =
@@ -122,22 +106,38 @@ configure(allprojects) { project ->
122106
"-Xlint:deprecation", "-Xlint:unchecked", "-Werror"]
123107

124108
compileTestJava.options*.compilerArgs = commonCompilerArgs +
125-
["-Xlint:-varargs", "-Xlint:-fallthrough","-Xlint:-rawtypes",
109+
["-Xlint:-varargs", "-Xlint:-fallthrough", "-Xlint:-rawtypes",
126110
"-Xlint:-deprecation", "-Xlint:-unchecked"]
127111

128112
compileJava {
129113
sourceCompatibility = 1.8 // can be switched to 10 for testing
130114
targetCompatibility = 1.8
131-
options.encoding = 'UTF-8'
115+
options.encoding = "UTF-8"
132116
}
133117

134118
compileTestJava {
135119
sourceCompatibility = 1.8 // can be switched to 10 for testing
136120
targetCompatibility = 1.8
137-
options.encoding = 'UTF-8'
121+
options.encoding = "UTF-8"
138122
options.compilerArgs += "-parameters"
139123
}
140124

125+
compileKotlin {
126+
kotlinOptions {
127+
jvmTarget = "1.8"
128+
freeCompilerArgs = ["-Xjsr305=strict"]
129+
apiVersion = "1.1"
130+
languageVersion = "1.1"
131+
}
132+
}
133+
134+
compileTestKotlin {
135+
kotlinOptions {
136+
jvmTarget = "1.8"
137+
freeCompilerArgs = ["-Xjsr305=strict"]
138+
}
139+
}
140+
141141
test {
142142
systemProperty("java.awt.headless", "true")
143143
systemProperty("testGroups", project.properties.get("testGroups"))
@@ -156,15 +156,15 @@ configure(allprojects) { project ->
156156

157157
dependencies {
158158
testCompile("junit:junit:4.12") {
159-
exclude group:'org.hamcrest', module:'hamcrest-core'
159+
exclude group: "org.hamcrest", module: "hamcrest-core"
160160
}
161161
testCompile("org.mockito:mockito-core:2.19.1") {
162-
exclude group:'org.hamcrest', module:'hamcrest-core'
162+
exclude group: "org.hamcrest", module: "hamcrest-core"
163163
}
164164
testCompile("com.nhaarman:mockito-kotlin:1.6.0") {
165-
exclude module:'kotlin-stdlib'
166-
exclude module:'kotlin-reflect'
167-
exclude module:'mockito-core'
165+
exclude module: "kotlin-stdlib"
166+
exclude module: "kotlin-reflect"
167+
exclude module: "mockito-core"
168168
}
169169
testCompile("org.hamcrest:hamcrest-all:1.3")
170170
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
@@ -221,7 +221,7 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
221221
options.header = project.name
222222
options.use = true
223223
options.links(project.ext.javadocLinks)
224-
options.addStringOption('Xdoclint:none', '-quiet')
224+
options.addStringOption("Xdoclint:none", "-quiet")
225225

226226
// Suppress warnings due to cross-module @see and @link references.
227227
// Note that global 'api' task does display all warnings.
@@ -231,7 +231,7 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
231231

232232
task sourcesJar(type: Jar, dependsOn: classes) {
233233
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
234-
classifier = 'sources'
234+
classifier = "sources"
235235
from sourceSets.main.allSource
236236
// Don't include or exclude anything explicitly by default. See SPR-12085.
237237
}
@@ -260,7 +260,7 @@ configure(rootProject) {
260260
}
261261
}
262262

263-
// don't publish the default jar for the root project
263+
// Don't publish the default jar for the root project
264264
configurations.archives.artifacts.clear()
265265

266266
dependencies { // for integration tests
@@ -290,7 +290,7 @@ configure(rootProject) {
290290

291291
task wrapper(type: Wrapper) {
292292
description = "Generates gradlew[.bat] scripts"
293-
gradleVersion = '4.4.1'
293+
gradleVersion = "4.4.1"
294294

295295
doLast() {
296296
def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
@@ -303,7 +303,6 @@ configure(rootProject) {
303303
"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
304304
}
305305
}
306-
307306
}
308307

309308
/*
@@ -317,7 +316,7 @@ def qualifyVersionIfNecessary(version) {
317316
if (rootProject.hasProperty("BRANCH_NAME")) {
318317
def qualifier = rootProject.getProperty("BRANCH_NAME")
319318
if (qualifier.startsWith("SPR-")) {
320-
return version.replace('BUILD', qualifier)
319+
return version.replace("BUILD", qualifier)
321320
}
322321
}
323322
return version

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ include "spring-framework-bom"
2525
include "buildSrc"
2626
rootProject.children.find{ it.name == "buildSrc" }.name = "spring-build-src"
2727

28-
rootProject.name = 'spring'
28+
rootProject.name = "spring"
2929
rootProject.children.each {project ->
3030
project.buildFileName = "${project.name}.gradle"
3131
}

spring-aop/spring-aop.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ description = "Spring AOP"
22

33
dependencies {
44
compile(project(":spring-beans"))
5-
compile(project(':spring-core'))
5+
compile(project(":spring-core"))
66
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
77
optional("org.apache.commons:commons-pool2:2.5.0")
88
optional("com.jamonapi:jamon:2.81")

spring-beans/spring-beans.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description = "Spring Beans"
33
apply plugin: "groovy"
44

55
dependencies {
6-
compile(project(':spring-core'))
6+
compile(project(":spring-core"))
77
optional("javax.inject:javax.inject:1")
88
optional("org.yaml:snakeyaml:1.20")
99
optional("org.codehaus.groovy:groovy-all:${groovyVersion}")
@@ -25,6 +25,6 @@ compileGroovy {
2525

2626
// This module also builds Kotlin code and the compileKotlin task naturally depends on
2727
// compileJava. We need to redefine dependencies to break task cycles.
28-
compileGroovy.dependsOn = compileGroovy.taskDependencies.values - 'compileJava'
28+
compileGroovy.dependsOn = compileGroovy.taskDependencies.values - "compileJava"
2929
compileKotlin.dependsOn(compileGroovy)
3030
compileKotlin.classpath += files(compileGroovy.destinationDir)

spring-context/spring-context.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apply plugin: "groovy"
55
dependencies {
66
compile(project(":spring-aop"))
77
compile(project(":spring-beans"))
8-
compile(project(':spring-core'))
8+
compile(project(":spring-core"))
99
compile(project(":spring-expression"))
1010
optional(project(":spring-instrument"))
1111
optional("javax.annotation:javax.annotation-api:1.3.2")

spring-oxm/spring-oxm.gradle

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ dependencies {
1010
castor "org.codehaus.castor:castor-anttasks:1.4.1"
1111
jibx "org.jibx:jibx-bind:1.3.1"
1212
jibx "org.apache.bcel:bcel:6.0"
13-
xjc 'javax.xml.bind:jaxb-api:2.3.0'
14-
xjc 'com.sun.xml.bind:jaxb-core:2.3.0'
15-
xjc 'com.sun.xml.bind:jaxb-impl:2.3.0'
16-
xjc 'com.sun.xml.bind:jaxb-xjc:2.2.11' // 2.3.0 breaks with "xjc failed"
17-
xjc 'com.sun.activation:javax.activation:1.2.0'
13+
xjc "javax.xml.bind:jaxb-api:2.3.0"
14+
xjc "com.sun.xml.bind:jaxb-core:2.3.0"
15+
xjc "com.sun.xml.bind:jaxb-impl:2.3.0"
16+
xjc "com.sun.xml.bind:jaxb-xjc:2.2.11" // 2.3.0 breaks with "xjc failed"
17+
xjc "com.sun.activation:javax.activation:1.2.0"
1818
}
1919

2020
ext.genSourcesDir = "${buildDir}/generated-sources"
@@ -101,19 +101,19 @@ dependencies {
101101
optional("javax.xml.bind:jaxb-api:2.3.0")
102102
optional("javax.activation:activation:1.1.1")
103103
optional("org.codehaus.castor:castor-xml:1.4.1") {
104-
exclude group: 'stax', module: 'stax-api'
104+
exclude group: "stax", module: "stax-api"
105105
exclude group: "org.springframework", module: "spring-context"
106106
exclude group: "commons-logging", module: "commons-logging"
107107
}
108108
optional("com.thoughtworks.xstream:xstream:1.4.10") {
109-
exclude group: 'xpp3', module: 'xpp3_min'
110-
exclude group: 'xmlpull', module: 'xmlpull'
109+
exclude group: "xpp3", module: "xpp3_min"
110+
exclude group: "xmlpull", module: "xmlpull"
111111
}
112112
optional("org.jibx:jibx-run:1.3.1")
113113
testCompile(project(":spring-context"))
114114
testCompile("org.ogce:xpp3:1.1.6")
115115
testCompile("org.codehaus.jettison:jettison:1.3.8") {
116-
exclude group: 'stax', module: 'stax-api'
116+
exclude group: "stax", module: "stax-api"
117117
}
118118
testCompile(files(genCastor.classesDir).builtBy(genCastor))
119119
testCompile(files(genJaxb.classesDir).builtBy(genJaxb))

spring-test/spring-test.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ dependencies {
7474
testCompile("org.apache.httpcomponents:httpclient:4.5.5") {
7575
exclude group: "commons-logging", module: "commons-logging"
7676
}
77-
testCompile('io.projectreactor.ipc:reactor-netty')
78-
testCompile('de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1')
77+
testCompile("io.projectreactor.ipc:reactor-netty")
78+
testCompile("de.bechte.junit:junit-hierarchicalcontextrunner:4.12.1")
7979
// Pull in the latest JUnit 5 Launcher API and the Vintage engine as well
8080
// so that we can run JUnit 4 tests in IntelliJ IDEA.
8181
testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")
@@ -87,7 +87,7 @@ dependencies {
8787
}
8888

8989
task testNG(type: Test) {
90-
description = 'Runs TestNG tests.'
90+
description = "Runs TestNG tests."
9191
useTestNG()
9292
scanForTestClasses = false
9393
include(["**/testng/**/*Tests.class", "**/testng/**/*Test.class"])
@@ -98,19 +98,19 @@ task testNG(type: Test) {
9898
}
9999

100100
test {
101-
description = 'Runs JUnit tests.'
101+
description = "Runs JUnit tests."
102102
dependsOn testNG
103103
useJUnit()
104104
scanForTestClasses = false
105-
include(['**/*Tests.class', '**/*Test.class', '**/SpringJUnitJupiterTestSuite.class'])
106-
exclude(['**/testng/**/*.*'])
105+
include(["**/*Tests.class", "**/*Test.class", "**/SpringJUnitJupiterTestSuite.class"])
106+
exclude(["**/testng/**/*.*"])
107107
// Java Util Logging for JUnit 5.
108-
// systemProperty('java.util.logging.manager', 'org.apache.logging.log4j.jul.LogManager')
108+
// systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
109109
reports.junitXml.destination = file("$buildDir/test-results")
110110
}
111111

112112
task aggregateTestReports(type: TestReport) {
113-
description = 'Aggregates JUnit and TestNG test reports.'
113+
description = "Aggregates JUnit and TestNG test reports."
114114
destinationDir = test.reports.html.destination
115115
reportOn test, testNG
116116
}

spring-webmvc/spring-webmvc.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies {
1111
compile(project(":spring-aop"))
1212
compile(project(":spring-beans"))
1313
compile(project(":spring-context"))
14-
compile(project(':spring-core'))
14+
compile(project(":spring-core"))
1515
compile(project(":spring-expression"))
1616
compile(project(":spring-web"))
1717
optional(project(":spring-context-support")) // for FreeMarker support
@@ -20,7 +20,7 @@ dependencies {
2020
optional("javax.servlet.jsp.jstl:javax.servlet.jsp.jstl-api:1.2.1")
2121
optional("javax.el:javax.el-api:3.0.1-b04")
2222
optional("javax.xml.bind:jaxb-api:2.3.0")
23-
optional('org.webjars:webjars-locator-core:0.35')
23+
optional("org.webjars:webjars-locator-core:0.35")
2424
optional("com.rometools:rome:1.9.0")
2525
optional("com.github.librepdf:openpdf:1.0.5")
2626
optional("org.apache.poi:poi-ooxml:3.17")

0 commit comments

Comments
 (0)