Skip to content

Commit d3be1cc

Browse files
committed
Use single quotes in Gradle build where appropriate
1 parent 69e4f21 commit d3be1cc

File tree

2 files changed

+165
-165
lines changed

2 files changed

+165
-165
lines changed

build.gradle

Lines changed: 112 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
buildscript {
22
repositories {
3-
maven { url "https://repo.spring.io/plugins-release" }
3+
maven { url 'https://repo.spring.io/plugins-release' }
44
}
55
dependencies {
6-
classpath("io.spring.gradle:propdeps-plugin:0.0.9.RELEASE")
7-
classpath("org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16")
6+
classpath('io.spring.gradle:propdeps-plugin:0.0.9.RELEASE')
7+
classpath('org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.16')
88
}
99
}
1010

1111
// 3rd party plugin repositories can be configured in settings.gradle
1212
plugins {
13-
id "io.spring.dependency-management" version "1.0.5.RELEASE" apply false
14-
id "org.jetbrains.kotlin.jvm" version "1.2.60" apply false
15-
id "org.jetbrains.dokka" version "0.9.17"
16-
id "org.asciidoctor.convert" version "1.5.7"
13+
id 'io.spring.dependency-management' version '1.0.5.RELEASE' apply false
14+
id 'org.jetbrains.kotlin.jvm' version '1.2.60' apply false
15+
id 'org.jetbrains.dokka' version '0.9.17'
16+
id 'org.asciidoctor.convert' version '1.5.7'
1717
}
1818

1919
ext {
@@ -28,41 +28,41 @@ ext {
2828
!it.name.equals('spring-build-src') && !it.name.equals('spring-framework-bom')
2929
}
3030

31-
aspectjVersion = "1.9.1"
32-
freemarkerVersion = "2.3.28"
33-
groovyVersion = "2.5.2"
34-
hsqldbVersion = "2.4.1"
35-
jackson2Version = "2.9.6"
36-
jettyVersion = "9.4.12.RC1"
31+
aspectjVersion = '1.9.1'
32+
freemarkerVersion = '2.3.28'
33+
groovyVersion = '2.5.2'
34+
hsqldbVersion = '2.4.1'
35+
jackson2Version = '2.9.6'
36+
jettyVersion = '9.4.12.RC1'
3737
junit5Version = '5.3.0-RC1'
38-
kotlinVersion = "1.2.60"
39-
log4jVersion = "2.11.1"
40-
nettyVersion = "4.1.28.Final"
41-
reactorVersion = "Californium-M1"
42-
rxjavaVersion = "1.3.8"
43-
rxjavaAdapterVersion = "1.2.1"
44-
rxjava2Version = "2.2.0"
45-
slf4jVersion = "1.7.25" // spring-jcl + consistent 3rd party deps
46-
tiles3Version = "3.0.8"
47-
tomcatVersion = "9.0.10"
48-
undertowVersion = "2.0.12.Final"
38+
kotlinVersion = '1.2.60'
39+
log4jVersion = '2.11.1'
40+
nettyVersion = '4.1.28.Final'
41+
reactorVersion = 'Californium-M1'
42+
rxjavaVersion = '1.3.8'
43+
rxjavaAdapterVersion = '1.2.1'
44+
rxjava2Version = '2.2.0'
45+
slf4jVersion = '1.7.25' // spring-jcl + consistent 3rd party deps
46+
tiles3Version = '3.0.8'
47+
tomcatVersion = '9.0.10'
48+
undertowVersion = '2.0.12.Final'
4949

5050
gradleScriptDir = "${rootProject.projectDir}/gradle"
5151
withoutJclOverSlf4J = {
52-
exclude group: "org.slf4j", module: "jcl-over-slf4j"
52+
exclude group: 'org.slf4j', module: 'jcl-over-slf4j'
5353
}
5454
}
5555

5656
configure(allprojects) { project ->
57-
group = "org.springframework"
57+
group = 'org.springframework'
5858
version = qualifyVersionIfNecessary(version)
5959

60-
apply plugin: "propdeps"
61-
apply plugin: "java"
62-
apply plugin: "test-source-set-dependencies"
63-
apply plugin: "io.spring.dependency-management"
60+
apply plugin: 'propdeps'
61+
apply plugin: 'java'
62+
apply plugin: 'test-source-set-dependencies'
63+
apply plugin: 'io.spring.dependency-management'
6464
apply from: "${gradleScriptDir}/ide.gradle"
65-
apply plugin: "checkstyle"
65+
apply plugin: 'checkstyle'
6666

6767
dependencyManagement {
6868
resolutionStrategy {
@@ -75,23 +75,23 @@ configure(allprojects) { project ->
7575
}
7676

7777
checkstyle {
78-
toolVersion = "8.10.1"
79-
configDir = rootProject.file("src/checkstyle")
78+
toolVersion = '8.10.1'
79+
configDir = rootProject.file('src/checkstyle')
8080
}
8181

82-
apply plugin: "kotlin"
82+
apply plugin: 'kotlin'
8383
compileKotlin {
8484
kotlinOptions {
85-
jvmTarget = "1.8"
86-
freeCompilerArgs = ["-Xjsr305=strict"]
87-
apiVersion = "1.1"
88-
languageVersion = "1.1"
85+
jvmTarget = '1.8'
86+
freeCompilerArgs = ['-Xjsr305=strict']
87+
apiVersion = '1.1'
88+
languageVersion = '1.1'
8989
}
9090
}
9191
compileTestKotlin {
9292
kotlinOptions {
93-
jvmTarget = "1.8"
94-
freeCompilerArgs = ["-Xjsr305=strict"]
93+
jvmTarget = '1.8'
94+
freeCompilerArgs = ['-Xjsr305=strict']
9595
}
9696
}
9797

@@ -109,17 +109,17 @@ configure(allprojects) { project ->
109109
}
110110

111111
def commonCompilerArgs =
112-
["-Xlint:serial", "-Xlint:cast", "-Xlint:classfile", "-Xlint:dep-ann",
113-
"-Xlint:divzero", "-Xlint:empty", "-Xlint:finally", "-Xlint:overrides",
114-
"-Xlint:path", "-Xlint:processing", "-Xlint:static", "-Xlint:try", "-Xlint:-options"]
112+
['-Xlint:serial', '-Xlint:cast', '-Xlint:classfile', '-Xlint:dep-ann',
113+
'-Xlint:divzero', '-Xlint:empty', '-Xlint:finally', '-Xlint:overrides',
114+
'-Xlint:path', '-Xlint:processing', '-Xlint:static', '-Xlint:try', '-Xlint:-options']
115115

116116
compileJava.options*.compilerArgs = commonCompilerArgs +
117-
["-Xlint:varargs", "-Xlint:fallthrough", "-Xlint:rawtypes",
118-
"-Xlint:deprecation", "-Xlint:unchecked", "-Werror"]
117+
['-Xlint:varargs', '-Xlint:fallthrough', '-Xlint:rawtypes',
118+
'-Xlint:deprecation', '-Xlint:unchecked', '-Werror']
119119

120120
compileTestJava.options*.compilerArgs = commonCompilerArgs +
121-
["-Xlint:-varargs", "-Xlint:-fallthrough","-Xlint:-rawtypes",
122-
"-Xlint:-deprecation", "-Xlint:-unchecked"]
121+
['-Xlint:-varargs', '-Xlint:-fallthrough', '-Xlint:-rawtypes',
122+
'-Xlint:-deprecation', '-Xlint:-unchecked']
123123

124124
compileJava {
125125
sourceCompatibility = 1.8 // can be switched to 10 for testing
@@ -131,88 +131,88 @@ configure(allprojects) { project ->
131131
sourceCompatibility = 1.8 // can be switched to 10 for testing
132132
targetCompatibility = 1.8
133133
options.encoding = 'UTF-8'
134-
options.compilerArgs += "-parameters"
134+
options.compilerArgs += '-parameters'
135135
}
136136

137137
test {
138-
systemProperty("java.awt.headless", "true")
139-
systemProperty("testGroups", project.properties.get("testGroups"))
138+
systemProperty('java.awt.headless', 'true')
139+
systemProperty('testGroups', project.properties.get('testGroups'))
140140
scanForTestClasses = false
141-
include(["**/*Tests.class", "**/*Test.class"])
141+
include(['**/*Tests.class', '**/*Test.class'])
142142
// Since we set scanForTestClasses to false, we need to filter out inner
143143
// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to
144144
// run MyTests by itself will fail if MyTests contains any inner classes.
145-
exclude(["**/Abstract*.class", '**/*$*'])
145+
exclude(['**/Abstract*.class', '**/*$*'])
146146
reports.junitXml.setDestination(file("$buildDir/test-results"))
147147
}
148148

149149
repositories {
150-
maven { url "https://repo.spring.io/libs-release" }
151-
maven { url "https://repo.spring.io/milestone" } // for Reactor
150+
maven { url 'https://repo.spring.io/libs-release' }
151+
maven { url 'https://repo.spring.io/milestone' } // for Reactor
152152
}
153153

154154
dependencies {
155155
testCompile('junit:junit:4.12') {
156156
exclude group:'org.hamcrest', module:'hamcrest-core'
157157
}
158-
testCompile("org.mockito:mockito-core:2.21.0") {
158+
testCompile('org.mockito:mockito-core:2.21.0') {
159159
exclude group:'org.hamcrest', module:'hamcrest-core'
160160
}
161-
testCompile("com.nhaarman:mockito-kotlin:1.6.0") {
161+
testCompile('com.nhaarman:mockito-kotlin:1.6.0') {
162162
exclude module:'kotlin-stdlib'
163163
exclude module:'kotlin-reflect'
164164
exclude module:'mockito-core'
165165
}
166-
testCompile("org.hamcrest:hamcrest-all:1.3")
166+
testCompile('org.hamcrest:hamcrest-all:1.3')
167167
testRuntime("org.apache.logging.log4j:log4j-core:${log4jVersion}")
168168
testRuntime("org.apache.logging.log4j:log4j-slf4j-impl:${log4jVersion}")
169169
testRuntime("org.apache.logging.log4j:log4j-jul:${log4jVersion}")
170170
// JSR-305 only used for non-required meta-annotations
171-
compileOnly("com.google.code.findbugs:jsr305:3.0.2")
172-
testCompileOnly("com.google.code.findbugs:jsr305:3.0.2")
173-
checkstyle("io.spring.javaformat:spring-javaformat-checkstyle:0.0.5")
171+
compileOnly('com.google.code.findbugs:jsr305:3.0.2')
172+
testCompileOnly('com.google.code.findbugs:jsr305:3.0.2')
173+
checkstyle('io.spring.javaformat:spring-javaformat-checkstyle:0.0.5')
174174
}
175175

176176
ext.javadocLinks = [
177-
"http://docs.oracle.com/javase/8/docs/api/",
178-
"http://docs.oracle.com/javaee/7/api/",
179-
"http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/", // CommonJ
180-
"http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs/",
181-
"http://glassfish.java.net/nonav/docs/v3/api/",
182-
"http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/",
183-
"http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/",
184-
"http://tiles.apache.org/tiles-request/apidocs/",
185-
"http://tiles.apache.org/framework/apidocs/",
186-
"http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
187-
"http://ehcache.org/apidocs/2.10.4",
188-
"http://quartz-scheduler.org/api/2.2.1/",
189-
"http://fasterxml.github.io/jackson-core/javadoc/2.8/",
190-
"http://fasterxml.github.io/jackson-databind/javadoc/2.8/",
191-
"http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.8/",
192-
"http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/"
177+
'http://docs.oracle.com/javase/8/docs/api/',
178+
'http://docs.oracle.com/javaee/7/api/',
179+
'http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs/', // CommonJ
180+
'http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs/',
181+
'http://glassfish.java.net/nonav/docs/v3/api/',
182+
'http://docs.jboss.org/jbossas/javadoc/4.0.5/connector/',
183+
'http://docs.jboss.org/jbossas/javadoc/7.1.2.Final/',
184+
'http://tiles.apache.org/tiles-request/apidocs/',
185+
'http://tiles.apache.org/framework/apidocs/',
186+
'http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/',
187+
'http://ehcache.org/apidocs/2.10.4',
188+
'http://quartz-scheduler.org/api/2.2.1/',
189+
'http://fasterxml.github.io/jackson-core/javadoc/2.8/',
190+
'http://fasterxml.github.io/jackson-databind/javadoc/2.8/',
191+
'http://fasterxml.github.io/jackson-dataformat-xml/javadoc/2.8/',
192+
'http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/'
193193
] as String[]
194194
}
195195

196-
configure(subprojects - project(":spring-build-src")) { subproject ->
196+
configure(subprojects - project(':spring-build-src')) { subproject ->
197197
apply from: "${gradleScriptDir}/publish-maven.gradle"
198198

199199
jar {
200-
manifest.attributes["Implementation-Title"] = subproject.name
201-
manifest.attributes["Implementation-Version"] = subproject.version
202-
manifest.attributes["Automatic-Module-Name"] = subproject.name.replace('-', '.') // for Jigsaw
203-
manifest.attributes["Created-By"] =
204-
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
200+
manifest.attributes['Implementation-Title'] = subproject.name
201+
manifest.attributes['Implementation-Version'] = subproject.version
202+
manifest.attributes['Automatic-Module-Name'] = subproject.name.replace('-', '.') // for Jigsaw
203+
manifest.attributes['Created-By'] =
204+
"${System.getProperty('java.version')} (${System.getProperty('java.specification.vendor')})"
205205

206206
from("${rootProject.projectDir}/src/docs/dist") {
207-
include "license.txt"
208-
include "notice.txt"
209-
into "META-INF"
210-
expand(copyright: new Date().format("yyyy"), version: project.version)
207+
include 'license.txt'
208+
include 'notice.txt'
209+
into 'META-INF'
210+
expand(copyright: new Date().format('yyyy'), version: project.version)
211211
}
212212
}
213213

214214
javadoc {
215-
description = "Generates project-level javadoc for use in -javadoc jar"
215+
description = 'Generates project-level javadoc for use in -javadoc jar'
216216

217217
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
218218
options.author = true
@@ -235,7 +235,7 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
235235
}
236236

237237
task javadocJar(type: Jar) {
238-
classifier = "javadoc"
238+
classifier = 'javadoc'
239239
from javadoc
240240
}
241241

@@ -246,9 +246,9 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
246246
}
247247

248248
configure(rootProject) {
249-
description = "Spring Framework"
249+
description = 'Spring Framework'
250250

251-
apply plugin: "groovy"
251+
apply plugin: 'groovy'
252252
apply from: "${gradleScriptDir}/jdiff.gradle"
253253
apply from: "${gradleScriptDir}/docs.gradle"
254254

@@ -262,22 +262,22 @@ configure(rootProject) {
262262
configurations.archives.artifacts.clear()
263263

264264
dependencies { // for integration tests
265-
testCompile(project(":spring-aop"))
266-
testCompile(project(":spring-beans"))
267-
testCompile(project(":spring-context"))
268-
testCompile(project(":spring-core"))
269-
testCompile(project(":spring-expression"))
270-
testCompile(project(":spring-jdbc"))
271-
testCompile(project(":spring-orm"))
272-
testCompile(project(":spring-test"))
273-
testCompile(project(":spring-tx"))
274-
testCompile(project(":spring-web"))
275-
testCompile("javax.inject:javax.inject:1")
276-
testCompile("javax.resource:javax.resource-api:1.7.1")
277-
testCompile("javax.servlet:javax.servlet-api:3.1.0")
265+
testCompile(project(':spring-aop'))
266+
testCompile(project(':spring-beans'))
267+
testCompile(project(':spring-context'))
268+
testCompile(project(':spring-core'))
269+
testCompile(project(':spring-expression'))
270+
testCompile(project(':spring-jdbc'))
271+
testCompile(project(':spring-orm'))
272+
testCompile(project(':spring-test'))
273+
testCompile(project(':spring-tx'))
274+
testCompile(project(':spring-web'))
275+
testCompile('javax.inject:javax.inject:1')
276+
testCompile('javax.resource:javax.resource-api:1.7.1')
277+
testCompile('javax.servlet:javax.servlet-api:3.1.0')
278278
testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
279279
testCompile("org.hsqldb:hsqldb:${hsqldbVersion}")
280-
testCompile("org.hibernate:hibernate-core:5.1.15.Final")
280+
testCompile('org.hibernate:hibernate-core:5.1.15.Final')
281281
}
282282

283283
artifacts {
@@ -288,13 +288,13 @@ configure(rootProject) {
288288

289289
wrapper {
290290
doLast() {
291-
def gradleOpts = "-XX:MaxMetaspaceSize=1024m -Xmx1024m"
291+
def gradleOpts = '-XX:MaxMetaspaceSize=1024m -Xmx1024m'
292292
def gradleBatOpts = "$gradleOpts -XX:MaxHeapSize=256m"
293-
File wrapperFile = file("gradlew")
294-
wrapperFile.text = wrapperFile.text.replace("DEFAULT_JVM_OPTS=",
293+
File wrapperFile = file('gradlew')
294+
wrapperFile.text = wrapperFile.text.replace('DEFAULT_JVM_OPTS=',
295295
"GRADLE_OPTS=\"$gradleOpts \$GRADLE_OPTS\"\nDEFAULT_JVM_OPTS=")
296-
File wrapperBatFile = file("gradlew.bat")
297-
wrapperBatFile.text = wrapperBatFile.text.replace("set DEFAULT_JVM_OPTS=",
296+
File wrapperBatFile = file('gradlew.bat')
297+
wrapperBatFile.text = wrapperBatFile.text.replace('set DEFAULT_JVM_OPTS=',
298298
"set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\nset DEFAULT_JVM_OPTS=")
299299
}
300300
}
@@ -309,9 +309,9 @@ configure(rootProject) {
309309
* e.g. 3.2.1.BUILD-SNAPSHOT => 3.2.1.SPR-1234-SNAPSHOT
310310
*/
311311
def qualifyVersionIfNecessary(version) {
312-
if (rootProject.hasProperty("BRANCH_NAME")) {
313-
def qualifier = rootProject.getProperty("BRANCH_NAME")
314-
if (qualifier.startsWith("SPR-")) {
312+
if (rootProject.hasProperty('BRANCH_NAME')) {
313+
def qualifier = rootProject.getProperty('BRANCH_NAME')
314+
if (qualifier.startsWith('SPR-')) {
315315
return version.replace('BUILD', qualifier)
316316
}
317317
}

0 commit comments

Comments
 (0)