Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Per-task skipCheckerFramework option doesn't work #281

@tmarback

Description

@tmarback

Hello!

I am trying to set up an additional build of the project's main sources before actually compiling with the Checker Framework enabled, so that the class files can be used with the @StaticallyExecutable annotation. Naturally, this task can't be run with Checker enabled, so I figured I could use the per-task exclusion setting that is listed on the instructions:

val preCompile = tasks.register<JavaCompile>("preCompile") {
    description = "Pre-compiles classes to use in static verification"

    classpath = sourceSets["main"].compileClasspath
    source = sourceSets["main"].java
    destinationDirectory = preCompiledClasses

    checkerFramework {
        skipCheckerFramework = true // Should disable Checker on this task
    }
}

However, what I'm finding is that the skipCheckerFramework setting at the task level has no effect at all, no matter which way I use it. Note that doing it exactly as the README says doesn't work either:

tasks.withType<JavaCompile>().configureEach {
    if (name.equals("preCompile")) {
        checkerFramework {
            skipCheckerFramework = true
        }
    }
}

In the end I had to tack on a Test at the end of the task name just so that it would get skipped by the excludeTests setting.

Am I using the setting wrong, or is there a specific setup needed for it to work?

(Using Gradle 8.8, checkerframework-gradle-plugin 0.6.42)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions