jamesfredley opened a new pull request, #15672:
URL: https://github.com/apache/grails-core/pull/15672
## 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:
```groovy
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:
```groovy
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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]