Skip to content

Upgrade 8.x+ to Gradle 9.9.0 - #16888

Open
codeconsole wants to merge 3 commits into
apache:8.0.xfrom
codeconsole:deps/gradle-9.9.0
Open

codeconsole wants to merge 3 commits into
apache:8.0.xfrom
codeconsole:deps/gradle-9.9.0

Conversation

@codeconsole

Copy link
Copy Markdown
Contributor

Moves the 8.0.x build, and the wrapper in newly generated applications, from Gradle 9.8.2 to 9.9.0.

Release notes: https://docs.gradle.org/9.9.0/release-notes.html
Upgrade notes: https://docs.gradle.org/9.9.0/userguide/upgrading_version_9.html

What changed

  • Wrappers regenerated with gradle -p gradle-bootstrap running on 9.9.0 (root, grails-gradle, grails-forge, end-to-end). build-logic, the grails-profiles skeletons, the grails-shell-cli gradle-sample fixture and Forge's generated-app assets, which bootstrap does not reach, were refreshed from the same output. Every gradle-wrapper.jar matches Gradle's published gradle-9.9.0-wrapper.jar.sha256 (621008af…). gradlew / gradlew.bat are unchanged.
  • Forge's generated-app gradle-wrapper.jar was still the 9.8.0 jar, because the 9.8.1 bump, which changed the jar, did not reach this copy. New applications now get the same jar as every other tree.
  • end-to-end/legacy-g7-command-plugin stays on Gradle 8.14.6, still the latest 8.14 release. Its wrapper jar follows bootstrap as usual. Its properties gain networkTimeout, retries and retryBackOffMs, which 9.9.0 writes for a Wrapper task declared in a build script, with the values the other wrappers already have. Its ./gradlew jar passes on JDK 17.
  • .sdkmanrc, gradleToolingApiVersion, Forge's gradleWrapperProperties.rocker.raw template, AGENTS.md and the gradle-developer and grails-8-upgrade skills move to 9.9.0. The "keep this synced" header comments the Wrapper task strips from the properties files were restored.
  • The gradle-developer skill now says to run bootstrap on the new Gradle, because the wrapper task copies the jar from the Gradle that runs it. It also points at the <script type="application/json" id="diagnostics"> block of the configuration cache report, since 9.9.0 removed the // begin-report-data markers.

Gradle 9.9.0 still embeds Groovy 4.0.33, so gradle-groovy.version does not change. Its embedded Kotlin moves to 2.4.21, which nothing in this repository pins.

Publishing

Release-mode dry run of 8.0.x (abb5890cf2) against this branch, publishing to TestCaseMavenRepo with GRAILS_PUBLISH_RELEASE=true, a throwaway signing key, projectVersion=8.0.1, the same SOURCE_DATE_EPOCH and --no-build-cache. It covered the whole grails-gradle build plus grails-base-bom, grails-bom, grails-bootstrap and grails-shell-cli.

grails-publish 1.0.0 works on 9.9.0. Both sides produce the same 336 files, including 56 signatures. Leaving out signatures and checksums, 13 files differ:

  • 10 .module files: the Gradle version in createdBy. The grails-shell-cli one also has gradle-tooling-api 9.9.0 and the sizes and checksums of its two changed jars.
  • grails-shell-cli POM: gradle-tooling-api 9.9.0.
  • grails-shell-cli jar: META-INF/sbom.json.
  • grails-shell-cli sources jar: the gradle-sample wrapper jar and properties.

The other root modules and Forge were not part of this run.

Deprecations

A dry run of the full task graph (build bootJar groovydoc publishAllPublicationsToTestCaseMavenRepoRepository aggregateViolations --dry-run --warning-mode=all) reports the same deprecations with the same counts on 9.8.2 and 9.9.0, and no configuration cache problems. It does not execute the tasks, so it says nothing about deprecations raised during execution. CliAutoDiscoverySpec, which runs tasks --all on a grails-web project with --warning-mode=fail, passes on 9.9.0.

Gradle 10

Gradle 9.9.0 deprecates the Ant integration, and Gradle 10 removes it along with the Ant classes that build logic gets implicitly. None of this is changed here:

  • gradle-bootstrap/build.gradle copies files with ant.*, so running bootstrap now prints Task.getAnt() deprecation warnings.
  • GrailsGradlePlugin filters resources through Ant's ReplaceTokens and EscapeUnicode. grails-bootstrap/build.gradle uses ReplaceTokens, and the settings scripts, the root build.gradle and GrailsExtension import other org.apache.tools.ant classes. These raise no warning on 9.9.0.

Merging up

Merges up to 8.1.x, 9.0.x and 9.1.x. From 8.1.x on, Forge's properties template is gradleWrapperProperties.gsp, which needs the same distributionUrl change.

Regenerates the wrappers with gradle -p gradle-bootstrap running on 9.9.0, because the wrapper task copies the jar from the Gradle that runs it. The jar matches Gradle's published gradle-9.9.0-wrapper.jar.sha256; gradlew and gradlew.bat are unchanged.

The legacy Grails 7 fixture stays on Gradle 8.14.6. Its generated properties gain networkTimeout, retries and retryBackOffMs, which a Wrapper task declared in a build script writes from 9.9.0 on.
Forge's generated-app wrapper jar was still the one from Gradle 9.8.0, because the 9.8.1 and 9.8.2 bumps moved only the properties template. It now matches the jar every other tree carries.
Moves the agent guide and skills to 9.9.0. The gradle-developer skill also says to run the bootstrap on the new Gradle, since an older one writes its own wrapper jar, and points at the block that holds the configuration cache report data, which 9.9.0 moved.
@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.3257%. Comparing base (abb5890) to head (7317b8b).

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##             8.0.x     #16888         +/-   ##
================================================
+ Coverage         0   62.3257%   +62.3257%     
- Complexity       0      27272      +27272     
================================================
  Files            0       2248       +2248     
  Lines            0     111466     +111466     
  Branches         0      20419      +20419     
================================================
+ Hits             0      69472      +69472     
- Misses           0      32652      +32652     
- Partials         0       9342       +9342     

see 2248 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codeconsole
codeconsole requested review from jamesfredley, jdaugherty, matrei and sbglasius and removed request for jdaugherty November 7, 2026 03:41
@testlens-app

testlens-app Bot commented Nov 7, 2026

Copy link
Copy Markdown

✅ All tests passed ✅

🏷️ Commit: 7317b8b
▶️ Tests: 105256 executed
⚪️ Checks: 94/94 completed


Learn more about TestLens at testlens.app/docs.

@sbglasius sbglasius left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This an AI assisted review

LGTM. A tidy, complete version bump.

What I checked on the PR head:

  • No stale versions left. git grep for 9.8.x, 9.8.<n> and gradle-9.8 across the tree (not counting jars) returns nothing. .sdkmanrc, gradleToolingApiVersion, every distributionUrl (root, build-logic, grails-gradle, grails-forge, end-to-end, both profile skeletons, the grails-shell-cli fixture) and the Forge Rocker template all say 9.9.0.
  • Wrapper jars are consistent. All 10 gradle-wrapper.jar files hash to 621008af…, which matches Gradle's published 9.9.0 checksum. That includes the Forge generated-app copy that was still on the 9.8.0 jar. Good catch.
  • Docs follow automatically. requirements.adoc uses {gradleVersion}, which grails-doc/build.gradle takes from gradle.gradleVersion, so the guide needs no manual edit. The "Gradle 9.7 or later" minimum in upgrading80x.adoc is still correct.
  • Legacy G7 fixture. It stays on 8.14.6. The new networkTimeout, retries and retryBackOffMs entries match the values in the other wrappers.
  • CI: 90 checks pass, and the rest are skipped publish/benchmark jobs.

One nit, not blocking:

  • .agents/skills/gradle-developer/SKILL.md: the comment on sdk env install says it "installs and selects" the versions. Please check that it also switches the current shell to them. If it only installs them, add a sdk env line so the next gradle -p gradle-bootstrap runs on 9.9.0. Otherwise it would run on the old Gradle, which is the exact jar mismatch this step warns about.

The merge-up note about gradleWrapperProperties.gsp on 8.1.x+ is useful. Thanks for spelling it out.

This branch has not been deployed

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants