Skip to content

Commit af7673d

Browse files
committed
Polish build
Issue: SPR-15885
1 parent f6023c2 commit af7673d

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

build.gradle

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,17 @@ configure(allprojects) { project ->
9191
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
9292
}
9393

94-
compileJava.options*.compilerArgs = [
95-
"-Xlint:serial", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
96-
"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
97-
"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
98-
"-Xlint:try", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
99-
"-Xlint:unchecked", "-Xlint:-options", "-Werror"
100-
]
101-
102-
compileTestJava.options*.compilerArgs = [
103-
"-Xlint:serial", "-Xlint:-varargs", "-Xlint:cast", "-Xlint:classfile",
104-
"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
105-
"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
106-
"-Xlint:try", "-Xlint:-fallthrough", "-Xlint:-rawtypes", "-Xlint:-deprecation",
107-
"-Xlint:-unchecked", "-Xlint:-options"]
94+
def compilerArgs = [
95+
"-Xlint:serial", "-Xlint:varargs", "-Xlint:cast", "-Xlint:classfile",
96+
"-Xlint:dep-ann", "-Xlint:divzero", "-Xlint:empty", "-Xlint:finally",
97+
"-Xlint:overrides", "-Xlint:path", "-Xlint:processing", "-Xlint:static",
98+
"-Xlint:try", "-Xlint:fallthrough", "-Xlint:rawtypes", "-Xlint:deprecation",
99+
"-Xlint:unchecked", "-Xlint:-options"
100+
]
101+
102+
compileJava.options*.compilerArgs = compilerArgs + "-Werror"
103+
104+
compileTestJava.options*.compilerArgs = compilerArgs
108105

109106
compileJava {
110107
sourceCompatibility = 1.8
@@ -128,7 +125,7 @@ configure(allprojects) { project ->
128125
// classes with the "$" pattern; otherwise, using -Dtest.single=MyTests to
129126
// run MyTests by itself will fail if MyTests contains any inner classes.
130127
exclude(["**/Abstract*.class", '**/*$*'])
131-
reports.junitXml.destination = file("$buildDir/test-results")
128+
reports.junitXml.setDestination(file("$buildDir/test-results"))
132129
}
133130

134131
repositories {
@@ -244,12 +241,6 @@ configure(rootProject) {
244241
applyMavenExclusions = false
245242
}
246243

247-
// TODO: DetectSplitPackagesPlugin fails in line 154 due to method not found on java.io.File.
248-
// TODO: Possibly related to user rights or OS differences; passes on local Windows machine.
249-
// detectSplitPackages {
250-
// projectsToScan -= project(":spring-instrument-tomcat")
251-
// }
252-
253244
// don't publish the default jar for the root project
254245
configurations.archives.artifacts.clear()
255246

0 commit comments

Comments
 (0)