diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d961831..eb58242 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,16 @@ jobs: - name: Checkout sources uses: actions/checkout@v6 - - name: Set up JDK + # Kotlin DSL compilation uses JDK 21 today (Gradle embeds Kotlin 2.2.x) + - name: Set up JDK 21 (Kotlin DSL toolchain) + uses: actions/setup-java@v5 + with: + distribution: temurin + java-version: 21 + + # Tests/Java toolchain tasks use JDK 25 + # JDK declaration order matters as the last one declared will be the default one (thus used to run Gradle itself) + - name: Set up JDK 25 (Gradle runtime + Java toolchain/tests) uses: actions/setup-java@v5 with: distribution: temurin diff --git a/README.md b/README.md index 751c49e..1f2ba60 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ tasks.withType().configureEach { violationRules { rules.forEach { rule -> rule.limits.forEach { limit -> - limit.minimum = "0.91".toBigDecimal() + limit.minimum = "0.83".toBigDecimal() } } } diff --git a/build.gradle.kts b/build.gradle.kts index 2981264..e070241 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,7 +10,7 @@ plugins { } group = "io.github.leanish" -version = "0.3.1" +version = "0.3.2-SNAPSHOT" repositories { gradlePluginPortal() @@ -19,13 +19,14 @@ repositories { java { toolchain { - // Build/test the plugin on Java 25 to mirror the conventions' default toolchain. + // No Java sources today, but pinning Java toolchain tasks (especially tests) to 25 to mirror the conventions' default toolchain. languageVersion.set(JavaLanguageVersion.of(25)) } } kotlin { - // Gradle embeds Kotlin 2.2.x today; pinning it to JDK 21 until Gradle uses Kotlin 2.3+. + // Gradle embeds Kotlin 2.2.x today; kotlin-dsl compilation stays on JDK 21 until Gradle moves to Kotlin 2.3+. + // At that point we should align this to 25 and simplify CI back to a single JDK. jvmToolchain(21) }