Skip to content

Commit 914277e

Browse files
committed
Let NullAway handle assertions in test code
1 parent afacf3b commit 914277e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import junitbuild.extensions.dependencyFromLibs
22
import junitbuild.extensions.javaModuleName
33
import net.ltgt.gradle.errorprone.errorprone
4+
import net.ltgt.gradle.nullaway.nullaway
45

56
plugins {
67
`java-library`
@@ -23,3 +24,9 @@ tasks.withType<JavaCompile>().configureEach {
2324
enable("NullAway")
2425
}
2526
}
27+
28+
tasks.compileTestJava {
29+
options.errorprone.nullaway {
30+
handleTestAssertionLibraries = true
31+
}
32+
}

0 commit comments

Comments
 (0)