Upgrade to Gradle 9.5.1#15672
Open
jamesfredley wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the repository’s Gradle wrapper/tooling from 9.4.1 → 9.5.1 across the various wrapper distributions/templates shipped by Grails (root, build-logic, grails-gradle, grails-forge, profiles, and test fixtures), and applies a small build script adjustment needed for Gradle 9.5 compatibility in the forge build.
Changes:
- Bump Gradle wrapper distributions and Gradle Tooling API version to 9.5.1 across wrapper property files and SDKMAN config.
- Regenerate wrapper scripts (
gradlew,gradlew.bat) in multiple embedded wrapper locations/templates. - Fix a Gradle 9.5 incompatibility in
grails-forge/grails-cli/build.gradleby updating the cross-project task reference to userootProject.project(...).tasks.named(...).
Reviewed changes
Copilot reviewed 27 out of 35 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| grails-shell-cli/src/test/resources/gradle-sample/gradlew.bat | Updated Windows wrapper script for the gradle-sample test fixture. |
| grails-shell-cli/src/test/resources/gradle-sample/gradlew | Updated Unix wrapper script for the gradle-sample test fixture. |
| grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.properties | Updated sample wrapper distribution URL to Gradle 9.5.1. |
| grails-profiles/profile/skeleton/gradlew.bat | Updated Windows wrapper script embedded in the profile skeleton. |
| grails-profiles/profile/skeleton/gradlew | Updated Unix wrapper script embedded in the profile skeleton. |
| grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.properties | Updated profile skeleton wrapper distribution URL to Gradle 9.5.1. |
| grails-profiles/base/skeleton/gradlew.bat | Updated Windows wrapper script embedded in the base skeleton. |
| grails-profiles/base/skeleton/gradlew | Updated Unix wrapper script embedded in the base skeleton. |
| grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.properties | Updated base skeleton wrapper distribution URL to Gradle 9.5.1. |
| grails-gradle/gradlew.bat | Updated Windows wrapper script for the grails-gradle sub-repo. |
| grails-gradle/gradlew | Updated Unix wrapper script for the grails-gradle sub-repo. |
| grails-gradle/gradle/wrapper/gradle-wrapper.properties | Updated grails-gradle wrapper distribution URL to Gradle 9.5.1 (and new wrapper properties). |
| grails-forge/grails-forge-core/src/main/resources/gradle/gradlew.bat | Updated Windows wrapper script shipped in forge-generated apps. |
| grails-forge/grails-forge-core/src/main/resources/gradle/gradlew | Updated Unix wrapper script shipped in forge-generated apps. |
| grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw | Updated forge app template wrapper properties to Gradle 9.5.1. |
| grails-forge/grails-cli/build.gradle | Gradle 9.5 compatibility fix for cross-project shadowJar task reference. |
| grails-forge/gradlew.bat | Updated Windows wrapper script for the grails-forge sub-repo. |
| grails-forge/gradlew | Updated Unix wrapper script for the grails-forge sub-repo. |
| grails-forge/gradle/wrapper/gradle-wrapper.properties | Updated grails-forge wrapper distribution URL to Gradle 9.5.1 (and new wrapper properties). |
| gradlew.bat | Updated root Windows wrapper script. |
| gradlew | Updated root Unix wrapper script. |
| gradle/wrapper/gradle-wrapper.properties | Updated root wrapper distribution URL to Gradle 9.5.1 (and new wrapper properties). |
| gradle.properties | Updated gradleToolingApiVersion to 9.5.1. |
| build-logic/gradlew.bat | Updated Windows wrapper script for build-logic. |
| build-logic/gradlew | Updated Unix wrapper script for build-logic. |
| build-logic/gradle/wrapper/gradle-wrapper.properties | Updated build-logic wrapper distribution URL to Gradle 9.5.1. |
| .sdkmanrc | Updated SDKMAN Gradle version pin to 9.5.1. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update the Gradle wrapper from 9.4.1 to 9.5.1 across all projects, plus
related fixes for the new Gradle version.
Wrapper version updates:
- gradle/wrapper/gradle-wrapper.properties (root)
- build-logic/gradle/wrapper/gradle-wrapper.properties
- grails-gradle/gradle/wrapper/gradle-wrapper.properties
- grails-forge/gradle/wrapper/gradle-wrapper.properties
- grails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.properties
- grails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.properties
- grails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.properties
- grails-forge/grails-forge-core/src/main/java/org/grails/forge/feature/build/gradle/templates/gradleWrapperProperties.rocker.raw
- .sdkmanrc (gradle=9.5.1)
- gradle.properties (gradleToolingApiVersion=9.5.1)
Regenerated wrapper jars and gradlew/gradlew.bat scripts in all the
locations above (via the gradle-bootstrap project for root/forge/grails-gradle
and direct propagation for build-logic, the profile skeletons, the forge
template, and the shell-cli test sample) so they match the new wrapper
properties.
Gradle 9.5 compatibility fix:
- grails-forge/grails-cli/build.gradle: change
`project(':grails-cli-shadow').tasks.named('shadowJar')` to use
`rootProject.project(':grails-cli-shadow')` (consistent with the
rootProject.project(':grails-forge-cli').tasks pattern used elsewhere
in the same file). In Gradle 9.5 the `project(...)` call inside a
`dependencies {}` block returns a `DefaultProjectDependency`, which no
longer exposes `.tasks`. Going through `rootProject.project(...)` keeps
the existing `evaluationDependsOn(':grails-cli-shadow')` ordering and
reaches the actual Project to grab the shadowJar task output.
Verified locally on JDK 21:
- ./gradlew codeStyle (root, grails-gradle, grails-forge): pass
- ./gradlew validateDependencyVersions (root + grails-gradle): pass
- ./gradlew build :grails-shell-cli:installDist groovydoc -PonlyCoreTests
(root, mirrors CI 'build' job): pass
- ./gradlew bootJar check -PonlyFunctionalTests -PskipHibernate5Tests
-PskipMongodbTests (root, mirrors CI 'functional' job): pass
- ./gradlew bootJar check -PonlyHibernate5Tests (root, mirrors CI
'hibernate5Functional' job): pass (571 tests, 0 failures)
- ./gradlew build -PgrailsIndy=false (grails-forge, mirrors CI
'buildForge' job): pass (1585 tasks)
- ./gradlew build (grails-gradle, mirrors CI 'buildGradle' job): pass
- ./gradlew :grails-wrapper:distZip :grails-doc:build: pass
- ./gradlew --version reports 9.5.1 from all four primary wrappers
The MongoDB functional tests (`-PonlyMongodbTests`) could not be
verified locally because the WSL2 + Docker Desktop environment used here
cannot reach Testcontainers-spawned containers on their dynamic ports;
the same job runs on GitHub Actions where Docker networking works.
Assisted-by: claude-code:claude-4.7-opus
98b2046 to
7e4c48e
Compare
✅ All tests passed ✅🏷️ Commit: 760a1a4 Learn more about TestLens at testlens.app. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the Gradle wrapper from 9.4.1 to 9.5.1 across every wrapper location in this repo, plus the one Gradle 9.5 source compatibility fix needed to keep the forge build green.
Wrapper version updates
Synchronized to
9.5.1in all 10 cross-referenced locations called out by the comment at the top ofgradle/wrapper/gradle-wrapper.properties:gradle/wrapper/gradle-wrapper.properties(root)build-logic/gradle/wrapper/gradle-wrapper.propertiesgrails-gradle/gradle/wrapper/gradle-wrapper.propertiesgrails-forge/gradle/wrapper/gradle-wrapper.propertiesgrails-profiles/base/skeleton/gradle/wrapper/gradle-wrapper.propertiesgrails-profiles/profile/skeleton/gradle/wrapper/gradle-wrapper.propertiesgrails-shell-cli/src/test/resources/gradle-sample/gradle/wrapper/gradle-wrapper.propertiesgrails-forge/grails-forge-core/.../gradleWrapperProperties.rocker.raw(forge generated app template).sdkmanrc(gradle=9.5.1)gradle.properties(gradleToolingApiVersion=9.5.1)Regenerated
gradle-wrapper.jar,gradlew, andgradlew.batin all eight locations that ship them:build-logic,grails-gradle,grails-forgegrails-forge/grails-forge-core/src/main/resources/gradle(the wrapper bundled into apps generated by forge)grails-profiles/base/skeleton,grails-profiles/profile/skeleton(the wrapper baked into the profile distributions)grails-shell-cli/src/test/resources/gradle-sample(test fixture)This matches the pattern used by previous Gradle wrapper bumps (e.g.
1dae938260 Update Gradle wrapper files to 9.3.1,66f6229306 Upgrade to Gradle 9.4.1). The root/forge/grails-gradle wrappers were regenerated through the existinggradle-bootstrapproject; the remaining four locations were updated by copying the regenerated artifacts.Gradle 9.5 source compatibility fix
grails-forge/grails-cli/build.gradleline 79 was using:Inside a
dependencies {}block,project(':path')returns aDefaultProjectDependency, and Gradle 9.5 no longer exposes a.tasksaccessor on that type. The same file already usesrootProject.project(':grails-forge-cli').tasks.named(...)on lines 206, 221, 227, and 233 for cross-project task references, so this PR aligns line 79 with that existing pattern:The existing
evaluationDependsOn(':grails-cli-shadow')on line 50 still guarantees the shadow project is configured before this lookup.Verification
All CI jobs were exercised locally on JDK 21 (Corretto 21.0.10):
codestyle.yml- Core./gradlew codeStylecodestyle.yml- Gradle Plugincd grails-gradle && ./gradlew codeStylecodestyle.yml- Forgecd grails-forge && ./gradlew codeStylegradle.yml- validateDependencies (core)./gradlew validateDependencyVersionsgradle.yml- validateDependencies (gradle)cd grails-gradle && ./gradlew validateDependencyVersionsgradle.yml- buildGradlecd grails-gradle && ./gradlew buildgradle.yml- build./gradlew build :grails-shell-cli:installDist groovydoc -PonlyCoreTests -PskipCodeStylegradle.yml- buildForgecd grails-forge && ./gradlew build -PgrailsIndy=false -PskipCodeStylegradle.yml- functional./gradlew bootJar check -PonlyFunctionalTests -PgebAtCheckWaiting -PskipHibernate5Tests -PskipMongodbTests -PskipCodeStylegradle.yml- hibernate5Functional./gradlew bootJar check -PonlyHibernate5Tests -PskipCodeStylegradle.yml- mongodbFunctional./gradlew bootJar check -PonlyMongodbTests -PmongodbContainerVersion=8.0 -PskipCodeStylegradle.yml- docs./gradlew grails-doc:buildgradle.yml- verifyWrapper (build half)./gradlew :grails-wrapper:distZip./gradlew --versionreportsGradle 9.5.1from all four primary wrappers (root,build-logic,grails-gradle,grails-forge).MongoDB functional tests
The
mongodbFunctionaljob could not be verified locally because the WSL2 + Docker Desktop environment used to validate this PR cannot reach Testcontainers-spawned containers on their dynamic ports (the Ryuk reaper and the spawnedmongo:8.0containers both refuse connections from the test JVM). This is an environment limitation, not a Gradle 9.5.1 issue - the same Testcontainers stack runs identically against 9.4.1 in this environment. The job is expected to pass on GitHub Actions where Docker networking is set up normally.Notes
Branch
Targets
8.0.x. Branch prefixfeat/so the PR auto-labels as a feature perCONTRIBUTING.md.