From 5dd61bcc64c29249aef085c7a67d1b0ed8c5c3cb Mon Sep 17 00:00:00 2001
From: Rohan Shetty <rshetty449@gmail.com>
Date: Wed, 27 Mar 2024 15:29:27 -0400
Subject: [PATCH] add option to test using local CF build

---
 build.gradle | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/build.gradle b/build.gradle
index fbd78f3..6fec8ab 100644
--- a/build.gradle
+++ b/build.gradle
@@ -43,6 +43,19 @@ dependencies {
   testImplementation libs.checkerframework.framework
 }
 
+// To use a locally-built Checker Framework, run gradle with "-PcfLocal".
+if (hasProperty('cfLocal')) {
+  def cfHome = String.valueOf(System.getenv('CHECKERFRAMEWORK'))
+  println cfHome
+  dependencies {
+    testImplementation files(cfHome + '/checker/dist/checker.jar')
+    testImplementation files(cfHome + '/framework-test/build/libs/framework-test-3.42.0-eisop3-SNAPSHOT.jar')
+    
+    // Need plume-util dependency to typecheck conformance tests 
+    testImplementation 'org.plumelib:plume-util:1.9.0'
+  }
+}
+
 spotless {
   format 'misc', {
     // define the files to apply `misc` to