checkerframework-gradle-plugin
checkerframework-gradle-plugin copied to clipboard
Add depencency automatically
I applied the plugin using the default configuration (as outlined in the README.md)
diff --git a/build.gradle b/build.gradle
index 41dd4e548d..3d49dba9df 100644
--- a/build.gradle
+++ b/build.gradle
@@ -24,6 +24,9 @@ plugins {
id 'checkstyle'
+ // Homepage: https://github.com/kelloggm/checkerframework-gradle-plugin
+ id 'org.checkerframework' version '0.6.40'
+
id 'project-report'
id 'idea'
@@ -38,6 +41,8 @@ apply plugin: XjcPlugin
apply from: 'eclipse.gradle'
+apply plugin: 'org.checkerframework'
+
group = "org.jabref"
version = project.findProperty('projVersion') ?: '100.0.0'
@@ -616,6 +621,13 @@ checkstyle {
sourceSets = []
}
+checkerFramework {
+ checkers = [
+ 'org.checkerframework.checker.nullness.NullnessChecker',
+ 'org.checkerframework.checker.units.UnitsChecker'
+ ]
+}
+
rewrite {
activeRecipe(
'org.jabref.config.rewrite.cleanup'
I get an error
error: AnnotationBuilder: fromClass can't load class org.checkerframework.dataflow.qual.Deterministic
Is the class in checker-qual.jar?
I saw at https://github.com/kelloggm/checkerframework-gradle-plugin/issues/263 and https://github.com/kelloggm/checkerframework-gradle-plugin?tab=readme-ov-file#specifying-a-checker-framework-version that one can specify some dependencies manually.
I would expect that the MWE shown in the README.md works. Maybe, its just a simple thing, but still causes trouble also by others https://stackoverflow.com/q/75648606/873282.