Skip to content

Commit 864451f

Browse files
author
Vincent Potucek
committed
resolve temporary constraint exclude of errorprone("com.google.guava:guava")
1 parent 343017b commit 864451f

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

gradle/plugins/common/src/main/kotlin/junitbuild.java-nullability-conventions.gradle.kts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ plugins {
1111
dependencies {
1212
errorprone(dependencyFromLibs("errorProne-core"))
1313
errorprone(dependencyFromLibs("nullaway"))
14-
constraints {
15-
errorprone("com.google.guava:guava") {
16-
version {
17-
require("33.4.8-jre")
18-
}
19-
because("Older versions use deprecated methods in sun.misc.Unsafe")
20-
}
21-
}
2214
}
2315

2416
nullaway {
@@ -27,8 +19,9 @@ nullaway {
2719

2820
tasks.withType<JavaCompile>().configureEach {
2921
options.errorprone {
30-
val shouldDisableErrorProne = java.toolchain.implementation.orNull == JvmImplementation.J9
31-
if (name == "compileJava" && !shouldDisableErrorProne) {
22+
disableWarningsInGeneratedCode = true
23+
disableAllChecks = !(name == "compileJava" && java.toolchain.implementation.orNull != JvmImplementation.J9)
24+
if (!disableAllChecks.get()) {
3225
disable(
3326

3427
// This check is opinionated wrt. which method names it considers unsuitable for import which includes
@@ -52,11 +45,9 @@ tasks.withType<JavaCompile>().configureEach {
5245
"MissingSummary",
5346
)
5447
error("PackageLocation")
55-
} else {
56-
disableAllChecks = true
5748
}
5849
nullaway {
59-
if (shouldDisableErrorProne) {
50+
if (disableAllChecks.get()) {
6051
disable()
6152
} else {
6253
enable()

0 commit comments

Comments
 (0)