@@ -20,20 +20,20 @@ plugins {
20
20
}
21
21
22
22
buildScan {
23
- licenseAgreementUrl = ' https://gradle.com/terms-of-service'
24
- licenseAgree = ' yes'
23
+ licenseAgreementUrl = " https://gradle.com/terms-of-service"
24
+ licenseAgree = " yes"
25
25
}
26
26
27
27
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"
34
34
35
35
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" )
37
37
}
38
38
39
39
aspectjVersion = " 1.8.13"
@@ -67,49 +67,33 @@ configure(allprojects) { project ->
67
67
group = " org.springframework"
68
68
version = qualifyVersionIfNecessary(version)
69
69
70
- apply plugin : " propdeps"
71
70
apply plugin : " java"
71
+ apply plugin : " kotlin"
72
+ apply plugin : " propdeps"
72
73
apply plugin : " test-source-set-dependencies"
73
74
apply plugin : " io.spring.dependency-management"
74
75
apply from : " ${ gradleScriptDir} /ide.gradle"
75
76
76
77
dependencyManagement {
77
78
resolutionStrategy {
78
- cacheChangingModulesFor 0 , ' seconds'
79
+ cacheChangingModulesFor 0 , " seconds"
79
80
}
80
81
applyMavenExclusions = false
81
82
generatedPomCustomization {
82
83
enabled = false
83
84
}
84
85
}
85
86
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
-
102
87
configurations. all {
103
88
// Check for updates every build
104
- resolutionStrategy. cacheChangingModulesFor 0 , ' seconds'
89
+ resolutionStrategy. cacheChangingModulesFor 0 , " seconds"
105
90
106
91
// Consistent slf4j version (e.g. clashes between slf4j versions)
107
92
resolutionStrategy. eachDependency { DependencyResolveDetails details ->
108
- if (details. requested. group == ' org.slf4j' ) {
93
+ if (details. requested. group == " org.slf4j" ) {
109
94
details. useVersion slf4jVersion
110
95
}
111
96
}
112
-
113
97
}
114
98
115
99
def commonCompilerArgs =
@@ -122,22 +106,38 @@ configure(allprojects) { project ->
122
106
" -Xlint:deprecation" , " -Xlint:unchecked" , " -Werror" ]
123
107
124
108
compileTestJava. options* . compilerArgs = commonCompilerArgs +
125
- [" -Xlint:-varargs" , " -Xlint:-fallthrough" ," -Xlint:-rawtypes" ,
109
+ [" -Xlint:-varargs" , " -Xlint:-fallthrough" , " -Xlint:-rawtypes" ,
126
110
" -Xlint:-deprecation" , " -Xlint:-unchecked" ]
127
111
128
112
compileJava {
129
113
sourceCompatibility = 1.8 // can be switched to 10 for testing
130
114
targetCompatibility = 1.8
131
- options. encoding = ' UTF-8'
115
+ options. encoding = " UTF-8"
132
116
}
133
117
134
118
compileTestJava {
135
119
sourceCompatibility = 1.8 // can be switched to 10 for testing
136
120
targetCompatibility = 1.8
137
- options. encoding = ' UTF-8'
121
+ options. encoding = " UTF-8"
138
122
options. compilerArgs + = " -parameters"
139
123
}
140
124
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
+
141
141
test {
142
142
systemProperty(" java.awt.headless" , " true" )
143
143
systemProperty(" testGroups" , project. properties. get(" testGroups" ))
@@ -156,15 +156,15 @@ configure(allprojects) { project ->
156
156
157
157
dependencies {
158
158
testCompile(" junit:junit:4.12" ) {
159
- exclude group :' org.hamcrest' , module :' hamcrest-core'
159
+ exclude group : " org.hamcrest" , module : " hamcrest-core"
160
160
}
161
161
testCompile(" org.mockito:mockito-core:2.19.1" ) {
162
- exclude group :' org.hamcrest' , module :' hamcrest-core'
162
+ exclude group : " org.hamcrest" , module : " hamcrest-core"
163
163
}
164
164
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"
168
168
}
169
169
testCompile(" org.hamcrest:hamcrest-all:1.3" )
170
170
testRuntime(" org.apache.logging.log4j:log4j-core:${ log4jVersion} " )
@@ -221,7 +221,7 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
221
221
options. header = project. name
222
222
options. use = true
223
223
options. links(project. ext. javadocLinks)
224
- options. addStringOption(' Xdoclint:none' , ' -quiet' )
224
+ options. addStringOption(" Xdoclint:none" , " -quiet" )
225
225
226
226
// Suppress warnings due to cross-module @see and @link references.
227
227
// Note that global 'api' task does display all warnings.
@@ -231,7 +231,7 @@ configure(subprojects - project(":spring-build-src")) { subproject ->
231
231
232
232
task sourcesJar(type : Jar , dependsOn : classes) {
233
233
duplicatesStrategy = DuplicatesStrategy . EXCLUDE
234
- classifier = ' sources'
234
+ classifier = " sources"
235
235
from sourceSets. main. allSource
236
236
// Don't include or exclude anything explicitly by default. See SPR-12085.
237
237
}
@@ -260,7 +260,7 @@ configure(rootProject) {
260
260
}
261
261
}
262
262
263
- // don 't publish the default jar for the root project
263
+ // Don 't publish the default jar for the root project
264
264
configurations. archives. artifacts. clear()
265
265
266
266
dependencies { // for integration tests
@@ -290,7 +290,7 @@ configure(rootProject) {
290
290
291
291
task wrapper(type : Wrapper ) {
292
292
description = " Generates gradlew[.bat] scripts"
293
- gradleVersion = ' 4.4.1'
293
+ gradleVersion = " 4.4.1"
294
294
295
295
doLast() {
296
296
def gradleOpts = " -XX:MaxMetaspaceSize=1024m -Xmx1024m"
@@ -303,7 +303,6 @@ configure(rootProject) {
303
303
" set GRADLE_OPTS=$gradleBatOpts %GRADLE_OPTS%\n set DEFAULT_JVM_OPTS=" )
304
304
}
305
305
}
306
-
307
306
}
308
307
309
308
/*
@@ -317,7 +316,7 @@ def qualifyVersionIfNecessary(version) {
317
316
if (rootProject. hasProperty(" BRANCH_NAME" )) {
318
317
def qualifier = rootProject. getProperty(" BRANCH_NAME" )
319
318
if (qualifier. startsWith(" SPR-" )) {
320
- return version. replace(' BUILD' , qualifier)
319
+ return version. replace(" BUILD" , qualifier)
321
320
}
322
321
}
323
322
return version
0 commit comments