diff --git a/build.gradle b/build.gradle index 85035d7..4f4ca90 100644 --- a/build.gradle +++ b/build.gradle @@ -44,6 +44,14 @@ dependencies { testImplementation libs.checkerframework.qual } +// To use a locally-built Checker Framework, run gradle with "-PcfLocal". +if (hasProperty('cfLocal')) { + def cfHome = String.valueOf(System.getenv('CHECKERFRAMEWORK')) + dependencies { + testImplementation files(cfHome + '/checker/dist/checker.jar') + } +} + spotless { format 'misc', { // define the files to apply `misc` to diff --git a/src/test/java/conformance/NullnessJSpecifyConformanceTest.java b/src/test/java/conformance/NullnessJSpecifyConformanceTest.java index 28d70aa..da0389d 100644 --- a/src/test/java/conformance/NullnessJSpecifyConformanceTest.java +++ b/src/test/java/conformance/NullnessJSpecifyConformanceTest.java @@ -7,6 +7,8 @@ import com.google.common.base.Splitter; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableSortedSet; + import java.io.File; import java.io.IOException; import java.nio.file.Path; @@ -76,7 +78,7 @@ public void conformanceTests() throws IOException { * @param deps the dependencies of the conformance tests. */ private static ImmutableSet analyze( - Path testDir, ImmutableList files, ImmutableList deps) { + Path testDir, ImmutableSortedSet files, ImmutableList deps) { ImmutableSet fileInputs = files.stream().map(Path::toFile).collect(toImmutableSet()); ImmutableList depsAsStrings =