Skip to content

Commit b323910

Browse files
make "-Xlint:all -Werror" only applicable to production code, not testing code
1 parent e8cc795 commit b323910

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,15 @@ spotless {
114114
tasks.check { dependsOn(tasks.spotlessApply) }
115115

116116
tasks.withType<JavaCompile>().configureEach {
117-
options.compilerArgs.addAll(listOf("-Xlint:all,-serial,-processing", "-Werror"))
118117
when (this) {
119-
tasks.compileJava.get() ->
118+
tasks.compileJava.get() -> {
119+
options.compilerArgs.addAll(listOf("-Xlint:all", "-Werror"))
120120
options.errorprone {
121121
disableWarningsInGeneratedCode = true
122122
option("NullAway:AnnotatedPackages", "com.mongodb.hibernate")
123123
error("NullAway")
124124
}
125+
}
125126
else -> options.errorprone.isEnabled = false
126127
}
127128
}

0 commit comments

Comments
 (0)