1
1
buildscript {
2
2
repositories {
3
- maven { url " https://repo.spring.io/plugins-release" }
3
+ maven { url ' https://repo.spring.io/plugins-release' }
4
4
}
5
5
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' )
8
8
}
9
9
}
10
10
11
11
// 3rd party plugin repositories can be configured in settings.gradle
12
12
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'
17
17
}
18
18
19
19
ext {
@@ -28,41 +28,41 @@ ext {
28
28
! it. name. equals(' spring-build-src' ) && ! it. name. equals(' spring-framework-bom' )
29
29
}
30
30
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'
37
37
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'
49
49
50
50
gradleScriptDir = " ${ rootProject.projectDir} /gradle"
51
51
withoutJclOverSlf4J = {
52
- exclude group : " org.slf4j" , module : " jcl-over-slf4j"
52
+ exclude group : ' org.slf4j' , module : ' jcl-over-slf4j'
53
53
}
54
54
}
55
55
56
56
configure(allprojects) { project ->
57
- group = " org.springframework"
57
+ group = ' org.springframework'
58
58
version = qualifyVersionIfNecessary(version)
59
59
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'
64
64
apply from : " ${ gradleScriptDir} /ide.gradle"
65
- apply plugin : " checkstyle"
65
+ apply plugin : ' checkstyle'
66
66
67
67
dependencyManagement {
68
68
resolutionStrategy {
@@ -75,23 +75,23 @@ configure(allprojects) { project ->
75
75
}
76
76
77
77
checkstyle {
78
- toolVersion = " 8.10.1"
79
- configDir = rootProject. file(" src/checkstyle" )
78
+ toolVersion = ' 8.10.1'
79
+ configDir = rootProject. file(' src/checkstyle' )
80
80
}
81
81
82
- apply plugin : " kotlin"
82
+ apply plugin : ' kotlin'
83
83
compileKotlin {
84
84
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'
89
89
}
90
90
}
91
91
compileTestKotlin {
92
92
kotlinOptions {
93
- jvmTarget = " 1.8"
94
- freeCompilerArgs = [" -Xjsr305=strict" ]
93
+ jvmTarget = ' 1.8'
94
+ freeCompilerArgs = [' -Xjsr305=strict' ]
95
95
}
96
96
}
97
97
@@ -109,17 +109,17 @@ configure(allprojects) { project ->
109
109
}
110
110
111
111
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' ]
115
115
116
116
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' ]
119
119
120
120
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' ]
123
123
124
124
compileJava {
125
125
sourceCompatibility = 1.8 // can be switched to 10 for testing
@@ -131,88 +131,88 @@ configure(allprojects) { project ->
131
131
sourceCompatibility = 1.8 // can be switched to 10 for testing
132
132
targetCompatibility = 1.8
133
133
options. encoding = ' UTF-8'
134
- options. compilerArgs + = " -parameters"
134
+ options. compilerArgs + = ' -parameters'
135
135
}
136
136
137
137
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' ))
140
140
scanForTestClasses = false
141
- include([" **/*Tests.class" , " **/*Test.class" ])
141
+ include([' **/*Tests.class' , ' **/*Test.class' ])
142
142
// Since we set scanForTestClasses to false, we need to filter out inner
143
143
// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to
144
144
// run MyTests by itself will fail if MyTests contains any inner classes.
145
- exclude([" **/Abstract*.class" , ' **/*$*' ])
145
+ exclude([' **/Abstract*.class' , ' **/*$*' ])
146
146
reports. junitXml. setDestination(file(" $buildDir /test-results" ))
147
147
}
148
148
149
149
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
152
152
}
153
153
154
154
dependencies {
155
155
testCompile(' junit:junit:4.12' ) {
156
156
exclude group :' org.hamcrest' , module :' hamcrest-core'
157
157
}
158
- testCompile(" org.mockito:mockito-core:2.21.0" ) {
158
+ testCompile(' org.mockito:mockito-core:2.21.0' ) {
159
159
exclude group :' org.hamcrest' , module :' hamcrest-core'
160
160
}
161
- testCompile(" com.nhaarman:mockito-kotlin:1.6.0" ) {
161
+ testCompile(' com.nhaarman:mockito-kotlin:1.6.0' ) {
162
162
exclude module :' kotlin-stdlib'
163
163
exclude module :' kotlin-reflect'
164
164
exclude module :' mockito-core'
165
165
}
166
- testCompile(" org.hamcrest:hamcrest-all:1.3" )
166
+ testCompile(' org.hamcrest:hamcrest-all:1.3' )
167
167
testRuntime(" org.apache.logging.log4j:log4j-core:${ log4jVersion} " )
168
168
testRuntime(" org.apache.logging.log4j:log4j-slf4j-impl:${ log4jVersion} " )
169
169
testRuntime(" org.apache.logging.log4j:log4j-jul:${ log4jVersion} " )
170
170
// 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' )
174
174
}
175
175
176
176
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/'
193
193
] as String []
194
194
}
195
195
196
- configure(subprojects - project(" :spring-build-src" )) { subproject ->
196
+ configure(subprojects - project(' :spring-build-src' )) { subproject ->
197
197
apply from : " ${ gradleScriptDir} /publish-maven.gradle"
198
198
199
199
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' )} )"
205
205
206
206
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)
211
211
}
212
212
}
213
213
214
214
javadoc {
215
- description = " Generates project-level javadoc for use in -javadoc jar"
215
+ description = ' Generates project-level javadoc for use in -javadoc jar'
216
216
217
217
options. memberLevel = org.gradle.external.javadoc.JavadocMemberLevel . PROTECTED
218
218
options. author = true
@@ -235,7 +235,7 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
235
235
}
236
236
237
237
task javadocJar(type : Jar ) {
238
- classifier = " javadoc"
238
+ classifier = ' javadoc'
239
239
from javadoc
240
240
}
241
241
@@ -246,9 +246,9 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
246
246
}
247
247
248
248
configure(rootProject) {
249
- description = " Spring Framework"
249
+ description = ' Spring Framework'
250
250
251
- apply plugin : " groovy"
251
+ apply plugin : ' groovy'
252
252
apply from : " ${ gradleScriptDir} /jdiff.gradle"
253
253
apply from : " ${ gradleScriptDir} /docs.gradle"
254
254
@@ -262,22 +262,22 @@ configure(rootProject) {
262
262
configurations. archives. artifacts. clear()
263
263
264
264
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' )
278
278
testCompile(" org.aspectj:aspectjweaver:${ aspectjVersion} " )
279
279
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' )
281
281
}
282
282
283
283
artifacts {
@@ -288,13 +288,13 @@ configure(rootProject) {
288
288
289
289
wrapper {
290
290
doLast() {
291
- def gradleOpts = " -XX:MaxMetaspaceSize=1024m -Xmx1024m"
291
+ def gradleOpts = ' -XX:MaxMetaspaceSize=1024m -Xmx1024m'
292
292
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=' ,
295
295
" GRADLE_OPTS=\" $gradleOpts \$ GRADLE_OPTS\"\n DEFAULT_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=' ,
298
298
" set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\n set DEFAULT_JVM_OPTS=" )
299
299
}
300
300
}
@@ -309,9 +309,9 @@ configure(rootProject) {
309
309
* e.g. 3.2.1.BUILD-SNAPSHOT => 3.2.1.SPR-1234-SNAPSHOT
310
310
*/
311
311
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-' )) {
315
315
return version. replace(' BUILD' , qualifier)
316
316
}
317
317
}
0 commit comments