diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index c642b22c03..acf0d55842 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -36,6 +36,11 @@ jobs: steps: - name: Check out NullAway sources uses: actions/checkout@v3 + - name: 'Set up JDK 21 so it is available' + uses: actions/setup-java@v3 + with: + java-version: '21-ea' + distribution: 'temurin' - name: 'Set up JDK 17 on Windows' uses: actions/setup-java@v3 with: diff --git a/annotations/build.gradle b/annotations/build.gradle index 5e06f02c25..ebb8ff5ca6 100644 --- a/annotations/build.gradle +++ b/annotations/build.gradle @@ -17,29 +17,10 @@ import net.ltgt.gradle.errorprone.CheckSeverity plugins { id 'java-library' - id 'nullaway.jacoco-conventions' + id 'nullaway.java-test-conventions' } dependencies { } -test { - maxHeapSize = "1024m" - // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer - jvmArgs += [ - "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", - // Accessed by Lombok tests - "--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED", - ] -} - apply plugin: 'com.vanniktech.maven.publish' diff --git a/buildSrc/src/main/groovy/nullaway.jacoco-conventions.gradle b/buildSrc/src/main/groovy/nullaway.jacoco-conventions.gradle deleted file mode 100644 index 1c7c97c620..0000000000 --- a/buildSrc/src/main/groovy/nullaway.jacoco-conventions.gradle +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2021. Uber Technologies - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Mostly taken from official Gradle sample: https://docs.gradle.org/current/samples/sample_jvm_multi_project_with_code_coverage.html -plugins { - id 'jacoco' -} - -jacoco { - toolVersion = "0.8.7" -} - -// Do not generate reports for individual projects -tasks.named("jacocoTestReport") { - enabled = false -} - -// Share sources folder with other projects for aggregated JaCoCo reports -configurations.create('transitiveSourcesElements') { - visible = false - canBeResolved = false - canBeConsumed = true - extendsFrom(configurations.implementation) - attributes { - attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, Usage.JAVA_RUNTIME)) - attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category, Category.DOCUMENTATION)) - attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType, 'source-folders')) - } - sourceSets.main.java.srcDirs.forEach { - outgoing.artifact(it) - } -} - -// Share the coverage data to be aggregated for the whole product -configurations.create('coverageDataElements') { - visible = false - canBeResolved = false - canBeConsumed = true - extendsFrom(configurations.implementation) - attributes { - attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, Usage.JAVA_RUNTIME)) - attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category, Category.DOCUMENTATION)) - attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType, 'jacoco-coverage-data')) - } - // This will cause the test task to run if the coverage data is requested by the aggregation task - outgoing.artifact(tasks.named("test").map { task -> - task.extensions.getByType(JacocoTaskExtension).destinationFile - }) -} diff --git a/buildSrc/src/main/groovy/nullaway.java-test-conventions.gradle b/buildSrc/src/main/groovy/nullaway.java-test-conventions.gradle new file mode 100644 index 0000000000..07f8f2690e --- /dev/null +++ b/buildSrc/src/main/groovy/nullaway.java-test-conventions.gradle @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2023. Uber Technologies + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Mostly taken from official Gradle sample: https://docs.gradle.org/current/samples/sample_jvm_multi_project_with_code_coverage.html +plugins { + id 'jacoco' +} + +jacoco { + toolVersion = "0.8.10" +} + +// Do not generate reports for individual projects +tasks.named("jacocoTestReport") { + enabled = false +} + +// Share sources folder with other projects for aggregated JaCoCo reports +configurations.create('transitiveSourcesElements') { + visible = false + canBeResolved = false + canBeConsumed = true + extendsFrom(configurations.implementation) + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, Usage.JAVA_RUNTIME)) + attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category, Category.DOCUMENTATION)) + attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType, 'source-folders')) + } + sourceSets.main.java.srcDirs.forEach { + outgoing.artifact(it) + } +} + +// Share the coverage data to be aggregated for the whole product +configurations.create('coverageDataElements') { + visible = false + canBeResolved = false + canBeConsumed = true + extendsFrom(configurations.implementation) + attributes { + attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, Usage.JAVA_RUNTIME)) + attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category, Category.DOCUMENTATION)) + attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType, 'jacoco-coverage-data')) + } + // This will cause the test task to run if the coverage data is requested by the aggregation task + outgoing.artifact(tasks.named("test").map { task -> + task.extensions.getByType(JacocoTaskExtension).destinationFile + }) +} + +test { + maxHeapSize = "1024m" + // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer + jvmArgs += [ + "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", + // Accessed by Lombok tests + "--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED", + ] +} + +// Create a task to test on JDK 21 +def testJdk21 = tasks.register("testJdk21", Test) { + onlyIf { + // Only test on JDK 21 when using the latest Error Prone version + deps.versions.errorProneApi == deps.versions.errorProneLatest + } + javaLauncher = javaToolchains.launcherFor { + languageVersion = JavaLanguageVersion.of(21) + } + + description = "Runs the test suite on JDK 21" + group = LifecycleBasePlugin.VERIFICATION_GROUP + + // Copy inputs from normal Test task. + def testTask = tasks.getByName("test") + classpath = testTask.classpath + testClassesDirs = testTask.testClassesDirs + maxHeapSize = "1024m" + // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer + jvmArgs += [ + "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", + "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", + "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", + // Accessed by Lombok tests + "--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED", + ] +} + +tasks.named('check').configure { + dependsOn testJdk21 +} diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle index c1c264e6b0..1e9bb1c99a 100755 --- a/gradle/dependencies.gradle +++ b/gradle/dependencies.gradle @@ -113,8 +113,7 @@ def test = [ springBeans : "org.springframework:spring-beans:5.3.7", springContext : "org.springframework:spring-context:5.3.7", grpcCore : "io.grpc:grpc-core:1.15.1", // Should upgrade, but this matches our guava version - mockito : "org.mockito:mockito-core:4.6.1", - mockitoInline : "org.mockito:mockito-inline:4.6.1", + mockito : "org.mockito:mockito-core:5.5.0", javaxAnnotationApi : "javax.annotation:javax.annotation-api:1.3.2", assertJ : "org.assertj:assertj-core:3.23.1", ] diff --git a/guava-recent-unit-tests/build.gradle b/guava-recent-unit-tests/build.gradle index b81bd0f8df..4d78ac52a3 100644 --- a/guava-recent-unit-tests/build.gradle +++ b/guava-recent-unit-tests/build.gradle @@ -15,7 +15,7 @@ */ plugins { id 'java-library' - id 'nullaway.jacoco-conventions' + id 'nullaway.java-test-conventions' } // We need this separate build target to test newer versions of Guava @@ -31,25 +31,6 @@ dependencies { testImplementation "com.google.guava:guava:31.1-jre" } -test { - maxHeapSize = "1024m" - // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer - jvmArgs += [ - "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", - // Accessed by Lombok tests - "--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED", - ] -} - // Create a task to test on JDK 8 def jdk8Test = tasks.register("testJdk8", Test) { onlyIf { diff --git a/jar-infer/jar-infer-lib/build.gradle b/jar-infer/jar-infer-lib/build.gradle index ec221573c2..2ae8bea7a8 100644 --- a/jar-infer/jar-infer-lib/build.gradle +++ b/jar-infer/jar-infer-lib/build.gradle @@ -15,7 +15,7 @@ */ plugins { id "java-library" - id 'nullaway.jacoco-conventions' + id 'nullaway.java-test-conventions' } // JarInfer requires JDK 11+, due to its dependence on WALA @@ -48,25 +48,15 @@ dependencies { } test { - maxHeapSize = "1024m" - // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer - jvmArgs += [ - "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", - // Accessed by Lombok tests - "--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED", - ] dependsOn ':jar-infer:test-android-lib-jarinfer:bundleReleaseAar' } +tasks.named('testJdk21', Test).configure { + // Tests fail since WALA does not yet support JDK 21; see https://github.com/uber/NullAway/issues/829 + // So, disable them + onlyIf { false } +} + tasks.withType(JavaCompile).configureEach { options.compilerArgs += "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED" } diff --git a/jar-infer/nullaway-integration-test/build.gradle b/jar-infer/nullaway-integration-test/build.gradle index 03da29711a..94a880861a 100644 --- a/jar-infer/nullaway-integration-test/build.gradle +++ b/jar-infer/nullaway-integration-test/build.gradle @@ -15,7 +15,7 @@ */ plugins { id "java-library" - id "nullaway.jacoco-conventions" + id "nullaway.java-test-conventions" } dependencies { @@ -26,21 +26,3 @@ dependencies { testImplementation project(":nullaway") testImplementation project(":jar-infer:test-java-lib-jarinfer") } - - -test { - maxHeapSize = "1024m" - // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer - jvmArgs += [ - "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", - ] -} diff --git a/jdk17-unit-tests/build.gradle b/jdk17-unit-tests/build.gradle index 8f37181bff..1c9f7f908d 100644 --- a/jdk17-unit-tests/build.gradle +++ b/jdk17-unit-tests/build.gradle @@ -15,7 +15,7 @@ */ plugins { id 'java-library' - id 'nullaway.jacoco-conventions' + id 'nullaway.java-test-conventions' } // Use JDK 17 for this module, via a toolchain @@ -44,19 +44,15 @@ dependencies { } test { - maxHeapSize = "1024m" - // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer jvmArgs += [ - "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", + // Expose a module path for tests as a JVM property. + // Used by com.uber.nullaway.jdk17.NullAwayModuleInfoTests + "-Dtest.module.path=${configurations.testModulePath.asPath}" + ] +} + +tasks.getByName('testJdk21').configure { + jvmArgs += [ // Expose a module path for tests as a JVM property. // Used by com.uber.nullaway.jdk17.NullAwayModuleInfoTests "-Dtest.module.path=${configurations.testModulePath.asPath}" diff --git a/jmh/build.gradle b/jmh/build.gradle index 03752ffbbc..68e3c58446 100644 --- a/jmh/build.gradle +++ b/jmh/build.gradle @@ -15,7 +15,7 @@ */ plugins { id 'java-library' - id 'nullaway.jacoco-conventions' + id 'nullaway.java-test-conventions' id 'me.champeau.jmh' } @@ -128,21 +128,11 @@ jmh { // includes = ['DFlowMicro'] } -// don't run test task on pre-JDK-11 VMs tasks.named('test') { // pass the extra JVM args so we can compile benchmarks in unit tests - jvmArgs extraJVMArgs - // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer - jvmArgs += [ - "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", - ] + jvmArgs += extraJVMArgs +} + +tasks.getByName('testJdk21').configure { + jvmArgs += extraJVMArgs } diff --git a/nullaway/build.gradle b/nullaway/build.gradle index 5b6346f4a9..026a89094a 100644 --- a/nullaway/build.gradle +++ b/nullaway/build.gradle @@ -17,7 +17,7 @@ import net.ltgt.gradle.errorprone.CheckSeverity plugins { id 'java-library' - id 'nullaway.jacoco-conventions' + id 'nullaway.java-test-conventions' } configurations { @@ -62,7 +62,6 @@ dependencies { testImplementation deps.test.grpcCore testImplementation project(":test-java-lib-lombok") testImplementation deps.test.mockito - testImplementation deps.test.mockitoInline testImplementation deps.test.javaxAnnotationApi testImplementation deps.test.assertJ } @@ -73,22 +72,6 @@ javadoc { test { - maxHeapSize = "1024m" - // to expose necessary JDK types on JDK 16+; see https://errorprone.info/docs/installation#java-9-and-newer - jvmArgs += [ - "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", - "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", - "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", - // Accessed by Lombok tests - "--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED", - ] if (deps.versions.errorProneApi == "2.4.0" && JavaVersion.current() >= JavaVersion.VERSION_17) { // This test does not pass on JDK 17 with Error Prone 2.4.0 due to a Mockito incompatibility. Skip it (the // test passes with more recent Error Prone versions on JDK 17) @@ -139,12 +122,25 @@ def jdk8Test = tasks.register("testJdk8", Test) { classpath = testTask.classpath testClassesDirs = testTask.testClassesDirs jvmArgs "-Xbootclasspath/p:${configurations.errorproneJavac.asPath}" + filter { + // tests cannot run on JDK 8 since Mockito version no longer supports it + excludeTestsMatching "com.uber.nullaway.NullAwaySerializationTest.initializationError" + excludeTestsMatching "com.uber.nullaway.handlers.contract.ContractUtilsTest.getEmptyAntecedent" + } } tasks.named('check').configure { dependsOn(jdk8Test) } +tasks.named('testJdk21', Test).configure { + filter { + // JSpecify Generics tests do not yet pass on JDK 21 + // See https://github.com/uber/NullAway/issues/827 + excludeTestsMatching "com.uber.nullaway.NullAwayJSpecifyGenericsTests" + } +} + // Create a task to build NullAway with NullAway checking enabled tasks.register('buildWithNullAway', JavaCompile) { onlyIf {