Repository navigation
Upgrade to Gradle 9.8.0 - #16403
Upgrade to Gradle 9.8.0#16403
Conversation
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
left a comment
There was a problem hiding this comment.
Approved, given the CI does not show any errors
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
|
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 |
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.
|
@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
Not exercised: the Nexus staging calls themselves ( |
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.
This comment has been minimized.
This comment has been minimized.
|
@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? |
|
@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 |
|
Looks like the last change for Spring Boot 4.1.2 spring-projects/spring-boot#51859 |
|
@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. |
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 thegrails-shell-cligradle-sample fixture.end-to-end/legacy-g7-command-pluginstays 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;gradlewis unchanged. Every copy in the repository was regenerated from the samegradle-bootstrapoutput, so all ten are byte-identical, and the jar matches Gradle's publishedgradle-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:GenerateMavenPomis up-to-date checked. Tracking stays off for a publication that registerspom.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 nowithXmland are now tracked; they come out identical.Signatureas aPublishArtifact, thesignaturesconfiguration,SigningExtension.getConfiguration(),SignOperation.getSignatures(), the classifiersign(...)overloads and theSignatureconstructors. The release signs withSigningExtension.sign(publications)anduseGpgCmd(), neither of which is affected.CopyandSyncget a lazydestinationDirectory. Only task types that overridegetDestinationDir()orsetDestinationDir()are affected; build-logic, grails-gradle and grails-publish have none.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:
.modulefiles, which record"version": "9.8.0"undercreatedBy.grails-shell-cli, which depends ongradle-tooling-api9.8.0. The version also appears in the embeddedMETA-INF/sbom.jsonof the jars that depend on it and in the tooling API classes shaded intograils-cli-all.grails.bat,grails-shell-cli.bat,grails-forge-cli.bat,grailsw.bat), which use the 9.8 template: errors are written with1>&2 echo, and every exit path ends ingoto exitWithErrorLevel. The Unix scripts are unchanged.grails-forge-core, thebaseandprofileprofiles and thegrails-shell-clisources jar.grails_forge_cli_completionin the CLI zip, which now lists the--featuresvalues in name order (see below).All other jars and POMs are byte-identical.
Configuration.visibleGradle 9.8 warns on
Configuration.setVisible(boolean), which has had no effect since 9.0 and is removed in Gradle 11.GrailsCliGradlePluginset it ongrailsCliDetect, so every build applying a Grails Gradle plugin reported deprecated Gradle features on 9.8. The call is removed, andCliAutoDiscoverySpecconfigures a grails-web project with--warning-mode=fail.Forge completion order
The
--featurescompletion candidates, and with themgrails_forge_cli_completionin the CLI zip and the "Possible values" in thecreate-*help, came out in a different order on every build, so the CLI zip was not reproducible.BaseAvailableFeaturesnow lists the feature names in name order, as--list-featuresalready does. The order in which features are applied is unchanged.