Skip to content

Upgrade to Gradle 9.5.1#15672

Open
jamesfredley wants to merge 3 commits into
apache:fix/8.0.x-merge-sb4-falloutfrom
jamesfredley:feat/gradle-9.5.1
Open

Upgrade to Gradle 9.5.1#15672
jamesfredley wants to merge 3 commits into
apache:fix/8.0.x-merge-sb4-falloutfrom
jamesfredley:feat/gradle-9.5.1

Conversation

@jamesfredley
Copy link
Copy Markdown
Contributor

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.1 in all 10 cross-referenced locations called out by the comment at the top of gradle/wrapper/gradle-wrapper.properties:

  • 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/.../gradleWrapperProperties.rocker.raw (forge generated app template)
  • .sdkmanrc (gradle=9.5.1)
  • gradle.properties (gradleToolingApiVersion=9.5.1)

Regenerated gradle-wrapper.jar, gradlew, and gradlew.bat in all eight locations that ship them:

  • root, build-logic, grails-gradle, grails-forge
  • grails-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 existing gradle-bootstrap project; the remaining four locations were updated by copying the regenerated artifacts.

Gradle 9.5 source compatibility fix

grails-forge/grails-cli/build.gradle line 79 was using:

shadowCombined files(project(':grails-cli-shadow').tasks.named('shadowJar'))

Inside a dependencies {} block, project(':path') returns a DefaultProjectDependency, and Gradle 9.5 no longer exposes a .tasks accessor on that type. The same file already uses rootProject.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:

shadowCombined files(rootProject.project(':grails-cli-shadow').tasks.named('shadowJar'))

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):

CI job Local invocation Result
codestyle.yml - Core ./gradlew codeStyle pass
codestyle.yml - Gradle Plugin cd grails-gradle && ./gradlew codeStyle pass
codestyle.yml - Forge cd grails-forge && ./gradlew codeStyle pass
gradle.yml - validateDependencies (core) ./gradlew validateDependencyVersions pass
gradle.yml - validateDependencies (gradle) cd grails-gradle && ./gradlew validateDependencyVersions pass
gradle.yml - buildGradle cd grails-gradle && ./gradlew build pass
gradle.yml - build ./gradlew build :grails-shell-cli:installDist groovydoc -PonlyCoreTests -PskipCodeStyle pass (14m 5s)
gradle.yml - buildForge cd grails-forge && ./gradlew build -PgrailsIndy=false -PskipCodeStyle pass (9m 17s, 1585 tasks)
gradle.yml - functional ./gradlew bootJar check -PonlyFunctionalTests -PgebAtCheckWaiting -PskipHibernate5Tests -PskipMongodbTests -PskipCodeStyle pass (7m 22s)
gradle.yml - hibernate5Functional ./gradlew bootJar check -PonlyHibernate5Tests -PskipCodeStyle pass (571 tests, 0 failures)
gradle.yml - mongodbFunctional ./gradlew bootJar check -PonlyMongodbTests -PmongodbContainerVersion=8.0 -PskipCodeStyle not verified locally - see below
gradle.yml - docs ./gradlew grails-doc:build pass
gradle.yml - verifyWrapper (build half) ./gradlew :grails-wrapper:distZip pass

./gradlew --version reports Gradle 9.5.1 from all four primary wrappers (root, build-logic, grails-gradle, grails-forge).

MongoDB functional tests

The mongodbFunctional job 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 spawned mongo:8.0 containers 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

  • Gradle 9.5.1 prints deprecation warnings about features that will be removed in Gradle 10. These were already present on 9.4.1 and are not in scope for this bump.
  • The build scan "Maximum custom value value length (100,000) exceeded: Git status" warning visible in some logs is from a local working tree with many stale stat-cache entries on this machine and does not appear on CI runners.

Branch

Targets 8.0.x. Branch prefix feat/ so the PR auto-labels as a feature per CONTRIBUTING.md.

Copilot AI review requested due to automatic review settings May 20, 2026 20:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.gradle by updating the cross-project task reference to use rootProject.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.

Comment thread gradlew.bat
Comment thread gradlew.bat
Comment thread build-logic/gradlew.bat
Comment thread build-logic/gradlew.bat
Comment thread grails-gradle/gradlew.bat
Comment thread grails-profiles/base/skeleton/gradlew.bat
Comment thread grails-profiles/profile/skeleton/gradlew.bat
Comment thread grails-profiles/profile/skeleton/gradlew.bat
Comment thread grails-shell-cli/src/test/resources/gradle-sample/gradlew.bat
Comment thread grails-shell-cli/src/test/resources/gradle-sample/gradlew.bat
@jamesfredley jamesfredley moved this to In Progress in Apache Grails May 21, 2026
@jamesfredley jamesfredley self-assigned this May 21, 2026
@jamesfredley jamesfredley added this to the grails:8.0.0-M2 milestone May 21, 2026
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
@jamesfredley jamesfredley changed the base branch from 8.0.x to fix/8.0.x-merge-sb4-fallout May 22, 2026 01:38
@testlens-app
Copy link
Copy Markdown

testlens-app Bot commented May 22, 2026

✅ All tests passed ✅

🏷️ Commit: 760a1a4
▶️ Tests: 15148 executed
⚪️ Checks: 31/31 completed


Learn more about TestLens at testlens.app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants