Treat warnings as errors when compiling
See gh-21271
This commit is contained in:
@@ -15,6 +15,7 @@ sourceSets {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompileOnly("com.google.code.findbugs:jsr305:3.0.2")
|
||||
testImplementation(enforcedPlatform(project(":spring-boot-project:spring-boot-dependencies")))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation("javax.validation:validation-api")
|
||||
|
||||
@@ -65,3 +65,9 @@ processResources {
|
||||
dependsOn reproducibleLoaderJar
|
||||
dependsOn reproducibleJarModeLayerToolsJar
|
||||
}
|
||||
|
||||
compileJava {
|
||||
if ((!project.hasProperty("buildJavaHome")) && JavaVersion.current() == JavaVersion.VERSION_1_8) {
|
||||
options.compilerArgs += ['-Xlint:-sunapi', '-XDenableSunApiLintControl']
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user