Skip to content

Upgrade to Gradle 9.8.0 - #16403

Merged
jdaugherty merged 6 commits into
apache:8.0.xfrom
codeconsole:deps/gradle-9.8.0
Sep 28, 2026
Merged

jdaugherty merged 6 commits into
apache:8.0.xfrom
codeconsole:deps/gradle-9.8.0

Conversation

@codeconsole

@codeconsole codeconsole commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Gradle 9.8.0

Grails builds on Gradle 9.8.0: .sdkmanrc, gradleToolingApiVersion, and the wrapper for root, build-logic, grails-gradle, grails-forge, end-to-end, plus the grails-shell-cli gradle-sample fixture. end-to-end/legacy-g7-command-plugin stays on Gradle 8.14.5, the version Grails 7 pins for that fixture.

Applications created by the forge and the profile CLIs get a 9.8.0 wrapper as well.

9.8.0 ships a new wrapper jar and a reworked gradlew.bat; gradlew is unchanged. Every copy in the repository was regenerated from the same gradle-bootstrap output, so all ten are byte-identical, and the jar matches Gradle's published gradle-9.8.0-wrapper.jar.sha256.

Grails 8 still requires Gradle 9.7 or later, so the upgrade guide's minimum stays as it is. Its ./gradlew wrapper --gradle-version {gradleVersion} example takes the version from the Gradle that builds the docs, so it picks up 9.8.0 without an edit.

Publishing changes in 9.8.0

What the release notes and upgrade guide change for publishing, against grails-publish 1.0.0-RC1 (grails-core, grails-gradle), 1.0.0-M1 (grails-forge) and build-logic's PublishPlugin:

  • GenerateMavenPom is up-to-date checked. Tracking stays off for a publication that registers pom.withXml, which grails-publish does for every publication it creates, so those POMs are still generated on every build. The plugin marker POMs of the Grails Gradle plugins have no withXml and are now tracked; they come out identical.
  • Signing APIs deprecated for Gradle 10: Signature as a PublishArtifact, the signatures configuration, SigningExtension.getConfiguration(), SignOperation.getSignatures(), the classifier sign(...) overloads and the Signature constructors. The release signs with SigningExtension.sign(publications) and useGpgCmd(), neither of which is affected.
  • Copy and Sync get a lazy destinationDirectory. Only task types that override getDestinationDir() or setDestinationDir() are affected; build-logic, grails-gradle and grails-publish have none.
  • Groovydoc options and Plugin Portal compatibility declarations are opt-in, and the Grails Gradle plugins are not published to the Plugin Portal.

Published artifacts

Built from the same sources with release settings, the published artifacts and release zips differ from a 9.7.1 build only in:

  • .module files, which record "version": "9.8.0" under createdBy.
  • grails-shell-cli, which depends on gradle-tooling-api 9.8.0. The version also appears in the embedded META-INF/sbom.json of the jars that depend on it and in the tooling API classes shaded into grails-cli-all.
  • The Windows start scripts Gradle generates (grails.bat, grails-shell-cli.bat, grails-forge-cli.bat, grailsw.bat), which use the 9.8 template: errors are written with 1>&2 echo, and every exit path ends in goto exitWithErrorLevel. The Unix scripts are unchanged.
  • The wrapper files bundled into grails-forge-core, the base and profile profiles and the grails-shell-cli sources jar.
  • grails_forge_cli_completion in the CLI zip, which now lists the --features values in name order (see below).

All other jars and POMs are byte-identical.

Configuration.visible

Gradle 9.8 warns on Configuration.setVisible(boolean), which has had no effect since 9.0 and is removed in Gradle 11. GrailsCliGradlePlugin set it on grailsCliDetect, so every build applying a Grails Gradle plugin reported deprecated Gradle features on 9.8. The call is removed, and CliAutoDiscoverySpec configures a grails-web project with --warning-mode=fail.

Forge completion order

The --features completion candidates, and with them grails_forge_cli_completion in the CLI zip and the "Possible values" in the create-* help, came out in a different order on every build, so the CLI zip was not reproducible. BaseAvailableFeatures now lists the feature names in name order, as --list-features already does. The order in which features are applied is unchanged.

Moves grails-core's own build from 9.7.1 to 9.8.0: `.sdkmanrc`,
`gradleToolingApiVersion`, and the wrapper for every Gradle build in the
repository — root, build-logic, grails-gradle, grails-forge, end-to-end — plus
the grails-shell-cli gradle-sample fixture.

The wrappers were regenerated with `gradle -p gradle-bootstrap` on 9.8.0, which
brings a new wrapper jar and a reworked `gradlew.bat`; `gradlew` is unchanged.
build-logic and the gradle-sample fixture, which bootstrap does not reach, were
refreshed from the same output, so the launcher scripts and wrapper jar stay
byte-identical everywhere. The jar matches Gradle's published
gradle-9.8.0-wrapper.jar.sha256.

`end-to-end/legacy-g7-command-plugin` stays on Gradle 8.14.5, the version
Grails 7 pins for that fixture; bootstrap's legacyG7Wrapper still refreshes its
launcher jar and `gradlew.bat`, as it did for 9.7.0.

The wrapper task regenerates the properties files from scratch, so the
"keep this synced" comments were restored afterwards.
Applications created by the forge and by the profile CLIs now get a 9.8.0
wrapper instead of 9.7.1.

For the forge, that is the `gradleWrapperProperties` template plus the
`gradlew.bat` and `gradle/wrapper/gradle-wrapper.jar` that `Gradle.java`
copies onto the generated project; `gradlew` is unchanged in 9.8.0.

For the profile CLIs, only the `base` and `profile` skeletons carry wrapper
assets; every other profile inherits them from `base`.

@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.

Approved, given the CI does not show any errors

@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.2651%. Comparing base (4f1a5c8) to head (ad8c3dc).
⚠️ Report is 131 commits behind head on 8.0.x.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##                8.0.x     #16403        +/-   ##
==================================================
+ Coverage     57.5998%   58.2651%   +0.6653%     
- Complexity      22697      23511       +814     
==================================================
  Files            2133       2174        +41     
  Lines          104226     105746      +1520     
  Branches        18692      18925       +233     
==================================================
+ Hits            60034      61613      +1579     
+ Misses          35906      35764       -142     
- Partials         8286       8369        +83     
Files with missing lines Coverage Δ
...radle/plugin/commands/GrailsCliGradlePlugin.groovy 0.0000% <ø> (ø)

... and 81 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.

@jdaugherty

Copy link
Copy Markdown
Contributor

9.8 release notes: https://docs.gradle.org/9.8.0/release-notes.html

Explicitly mention publish changes. I have been trying really hard to get the bug fixes merged so we can release 8.0.0 and the publish plugin has not been confirmed working. we should defer this to 8.1.

@jdaugherty
jdaugherty changed the base branch from 8.0.x to 8.1.x September 25, 2026 13:33
@matrei

matrei commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

9.8 release notes: https://docs.gradle.org/9.8.0/release-notes.html

Explicitly mention publish changes. I have been trying really hard to get the bug fixes merged so we can release 8.0.0 and the publish plugin has not been confirmed working. we should defer this to 8.1.

@jdaugherty apache/grails-gradle-publish#39
Tests seem to be passing.

Gradle 9.8 starts warning on `Configuration.setVisible(boolean)`, which is
scheduled for removal in Gradle 11. The property has had no effect since
Gradle 9.0, but GrailsCliGradlePlugin still set it on the grailsCliDetect
configuration, so on 9.8 every build that applies a Grails Gradle plugin
reported deprecated Gradle features.

CliAutoDiscoverySpec now configures every task of a grails-web project with
`--warning-mode=fail`, so a deprecation the plugins introduce fails the test.
@codeconsole

Copy link
Copy Markdown
Contributor Author

@jdaugherty I added the publishing changes to the description.

To check the publish plugin on 9.8.0, I ran the release job's assemble and publish steps for grails-gradle, grails-core and grails-forge twice, on 8.0.x with 9.7.1 and on this branch with 9.8.0: GRAILS_PUBLISH_RELEASE=true, projectVersion=8.0.0, the same SOURCE_DATE_EPOCH, gpg signing through SIGNING_KEY, and TestCaseMavenRepo / mavenLocal in place of the staging repository.

  • Both runs publish the same 5,847 files. All 843 signatures verify and every checksum file matches.
  • 448 of 460 jars and every POM except grails-shell-cli's are byte-identical. The rest differ only as listed under "Published artifacts".
  • aggregatePublishedArtifacts output is identical, and aggregateChecksums differs only for those jars.
  • The only new deprecation warning was Configuration.setVisible from GrailsCliGradlePlugin, fixed in 6c54b95.

Not exercised: the Nexus staging calls themselves (initializeSonatypeStagingRepository, closeSonatypeStagingRepository). The upload goes through the same PublishToMavenRepository tasks that the snapshot publish runs on the first push to 8.0.x.

The `--features` completion candidates, and with them the bash completion
script in the CLI distribution and the "Possible values" in the create-*
help, came out in a different order on every build. BaseAvailableFeatures
kept the order of the injected features, which are ordered only by
`Feature.getOrder()`. Most features share one order, and those ties come out
differently from run to run: three `buildCompletion` runs from the same
sources produced three different scripts, so the CLI zip was not
reproducible.

BaseAvailableFeatures now iterates the names sorted, as `--list-features`
already lists them. The order in which features are applied is unchanged.
@testlens-app

This comment has been minimized.

@codeconsole

Copy link
Copy Markdown
Contributor Author

@jdaugherty I am running all Grails apps now using Gradle 9.8.0 and I published SiteMesh 3.3.0-RC2 to Maven Central using Gradle 9.8.0 Thoughts?

@jdaugherty

Copy link
Copy Markdown
Contributor

@codeconsole it may work with grails but it does not work with our publish plugin, so during the release we'll have issues. see apache/grails-gradle-publish#39 - we should hold for 8.1

@codeconsole

Copy link
Copy Markdown
Contributor Author

Looks like the last change for Spring Boot 4.1.2 spring-projects/spring-boot#51859

@jdaugherty

Copy link
Copy Markdown
Contributor

@codeconsole once the publish plugin is worked through, I'm good to merge this. I'd like this PR to point to the snapshot build of the publish plugin that includes the associated publish PR merged - we'll change it over to the release RC2 of that plugin when we do the grails rc2 publish. Please hold on merging until that PR is merged & built for this PR to work correctly. As part of my testing, I found issues in Grails-core that I've fixed on that PR now.

@jdaugherty
jdaugherty changed the base branch from 8.1.x to 8.0.x September 28, 2026 14:24
@jdaugherty
jdaugherty merged commit c482791 into apache:8.0.x Sep 28, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants