Skip to content

Commit f531277

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

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

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

Lines changed: 3 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,8 @@ 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+
disableAllChecks = !(name == "compileJava" && java.toolchain.implementation.orNull != JvmImplementation.J9)
23+
if (!disableAllChecks.get()) {
3224
disable(
3325

3426
// This check is opinionated wrt. which method names it considers unsuitable for import which includes
@@ -52,11 +44,9 @@ tasks.withType<JavaCompile>().configureEach {
5244
"MissingSummary",
5345
)
5446
error("PackageLocation")
55-
} else {
56-
disableAllChecks = true
5747
}
5848
nullaway {
59-
if (shouldDisableErrorProne) {
49+
if (disableAllChecks.get()) {
6050
disable()
6151
} else {
6252
enable()

0 commit comments

Comments
 (0)