From c803f60217cf183008308ffc6beda76623038035 Mon Sep 17 00:00:00 2001 From: Rohan Shetty Date: Fri, 26 Apr 2024 18:16:46 -0400 Subject: [PATCH 1/2] Add local plume-utils dependency --- build.gradle | 5 +++++ gradle/libs.versions.toml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/build.gradle b/build.gradle index 4f4ca90..e415d58 100644 --- a/build.gradle +++ b/build.gradle @@ -49,6 +49,11 @@ if (hasProperty('cfLocal')) { def cfHome = String.valueOf(System.getenv('CHECKERFRAMEWORK')) dependencies { testImplementation files(cfHome + '/checker/dist/checker.jar') + testImplementation files(cfHome + '/checker/dist/checker-qual.jar') + testImplementation fileTree(dir: cfHome + '/framework-test/build/libs', + include: '*.jar', + exclude: ['*-sources.jar', '*-javadoc.jar']) + testImplementation libs.plume.utils } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f3b63c2..1b1733f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,6 +3,7 @@ junitVer = "5.9.1" guavaVer = "31.1-jre" jSpecifyConformanceTestVer = "0.0.0-SNAPSHOT" checkerFrameworkVer = "3.42.0-eisop3" +plumeUtilVer = "1.9.0" [libraries] junit = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junitVer" } @@ -12,3 +13,4 @@ jspecify-conformance-framework = { module = "org.jspecify.conformance:conformanc checkerframework-checker = { module = "io.github.eisop:checker", version.ref = "checkerFrameworkVer" } checkerframework-framework-test = { module = "io.github.eisop:framework-test", version.ref = "checkerFrameworkVer" } checkerframework-qual = { module = "io.github.eisop:checker-qual", version.ref = "checkerFrameworkVer" } +plume-utils = { module = "org.plumelib:plume-util", version.ref = "plumeUtilVer" } From 0388fd5aafdc98281a28165b12ea206822b58824 Mon Sep 17 00:00:00 2001 From: Rohan Shetty Date: Sat, 27 Apr 2024 10:58:11 -0400 Subject: [PATCH 2/2] refactor dependencies --- build.gradle | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index e415d58..dc77b5d 100644 --- a/build.gradle +++ b/build.gradle @@ -33,15 +33,8 @@ dependencies { testImplementation libs.junit testRuntimeOnly libs.junit - // This dependency is used by the application. - implementation libs.guava - testImplementation libs.jspecify.conformance.framework jSpecifyConformanceTests libs.jspecify.conformance.tests - - testImplementation libs.checkerframework.checker - testImplementation libs.checkerframework.framework.test - testImplementation libs.checkerframework.qual } // To use a locally-built Checker Framework, run gradle with "-PcfLocal". @@ -50,11 +43,23 @@ if (hasProperty('cfLocal')) { dependencies { testImplementation files(cfHome + '/checker/dist/checker.jar') testImplementation files(cfHome + '/checker/dist/checker-qual.jar') - testImplementation fileTree(dir: cfHome + '/framework-test/build/libs', - include: '*.jar', - exclude: ['*-sources.jar', '*-javadoc.jar']) + + def frameworkTestTree = fileTree(dir: cfHome + '/framework-test/build/libs', + include: '*.jar', + exclude: ['*-sources.jar', '*-javadoc.jar']) + + if (frameworkTestTree.files.size() != 1) { + logger.warn("Expected exactly one framework-test jar, but found " + frameworkTestTree.files.size() + " jars.") + } + testImplementation frameworkTestTree testImplementation libs.plume.utils } +} else { + dependencies { + testImplementation libs.checkerframework.checker + testImplementation libs.checkerframework.framework.test + testImplementation libs.checkerframework.qual + } } spotless {