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.

checkerFrameworkAnnotatedJDK references JDK8 when JDK 21 is used #290

@jpschewe

Description

@jpschewe

I'm using a plugin to check when I have dependencies that need updating. It's the ben-manes.versions plugin show in the below gradle file. This plugin keeps complaining that the annotatedJDK8 exceeds the milestone version.

Here is a simple build script that references the checker framework and uses the versions plugin.

buildscript {
    repositories {
        mavenCentral()
        gradlePluginPortal()
    }
    configurations.classpath {
      exclude(group: "com.google.guava", module: "guava")
    }
}    

plugins {
    id "java"
    // Checker Framework pluggable type-checking
    id "org.checkerframework" version "0.6.37"
    id "com.github.ben-manes.versions" version "0.51.0" // adds dependencyUpdates task
}

repositories {
    mavenCentral()
}

dependencies {
  implementation(group: "org.checkerframework", name: "checker-qual", version: "3.42.0")
  implementation(group: "org.checkerframework", name: "checker-util", version: "3.42.0")
  checkerFramework(group: "org.checkerframework", name: "checker", version: "3.42.0")
}

Running dependencyUpdates I get

The following dependencies exceed the version found at the milestone revision level:
 - org.checkerframework:jdk8 [3.42.0 <- 3.3.0]
     https://checkerframework.org

Executing a dependencies check I see checkerFrameworkAnnotatedJDK referencing a jdk8 version that doesn't exist. From doing some searching on checker it appears that the annotated JDK is included in checker from versions 3.5.0 and forward.

./gradlew dependencies

> Task :dependencies

------------------------------------------------------------
Root project 'bug-checkerframework'
------------------------------------------------------------

annotationProcessor - Annotation processors and their dependencies for source set 'main'.
No dependencies

checkerFramework - A copy of JDK classes with Checker Framework type qualifiers inserted.
\--- org.checkerframework:checker:3.42.0
     +--- org.checkerframework:checker-qual:3.42.0
     \--- org.checkerframework:checker-util:3.42.0
          \--- org.checkerframework:checker-qual:3.42.0

checkerFrameworkAnnotatedJDK - A copy of JDK classes with Checker Framework type qualifiers inserted.
\--- org.checkerframework:jdk8:3.42.0 FAILED

...

Is there something I have wrong in my build.gradle that makes the gradle checkerframework plugin believe that it needs to include the annotated JDK?
Or is the versions plugin finding dependencies that it should not?

I'd like to understand the right way to "fix" this.
It's not actually breaking my build, it's just concerning to see that I have a dependency that exceeds the milestone level.

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