From 0388fd5aafdc98281a28165b12ea206822b58824 Mon Sep 17 00:00:00 2001 From: Rohan Shetty Date: Sat, 27 Apr 2024 10:58:11 -0400 Subject: [PATCH] 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 {