Make the Gradle-version CI matrix use the requested Gradle version - #30
Make the Gradle-version CI matrix use the requested Gradle version#30mernst wants to merge 1 commit into
Conversation
The test-gradle job passes -Ptest.gradle-version but no test.java-toolchain, and build.gradle.kts forwarded the Gradle version to the test JVM only when the toolchain property was also set. Every matrix job therefore ran against the Gradle version embedded in the build. Forwarding the property reveals that Gradle below 8.2.1 cannot configure a Kotlin DSL build script that applies this plugin, because the plugin is compiled by the Kotlin compiler embedded in a newer Gradle. Skip the Kotlin DSL tests there; the Groovy tests still cover those Gradle versions. Also refresh the version matrix and fix the test-report artifact path, which named a source set that does not exist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe Gradle compatibility matrix now includes newer patch releases and documents the Kotlin DSL limitation below Gradle 8.2.1. The Gradle version property is configured independently from the Java toolchain property. Functional test reports use the functional test report directory. Kotlin DSL functional tests define Gradle 8.2.1 as the minimum supported version and skip setup for older versions. Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/gradle.yml:
- Around line 61-65: Add a job-level permissions block to the test-gradle job,
granting only contents: read for its checkout, setup, Gradle, and
artifact-upload steps; leave all other token scopes omitted.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: c885008a-17c0-4d9f-9f29-9d499abd23d5
📒 Files selected for processing (4)
.github/workflows/gradle.ymlbuild.gradle.ktssrc/functionalTest/kotlin/org/checkerframework/plugin/gradle/Fixtures.ktsrc/functionalTest/kotlin/org/checkerframework/plugin/gradle/KotlinPluginFunctionalTest.kt
The test-gradle job passes -Ptest.gradle-version but no test.java-toolchain, and build.gradle.kts forwarded the Gradle version to the test JVM only when the toolchain property was also set. Every matrix job therefore ran against the Gradle version embedded in the build.
Forwarding the property reveals that Gradle below 8.2.1 cannot configure a Kotlin DSL build script that applies this plugin, because the plugin is compiled by the Kotlin compiler embedded in a newer Gradle. Skip the Kotlin DSL tests there; the Groovy tests still cover those Gradle versions.
Also refresh the version matrix and fix the test-report artifact path, which named a source set that does not exist.