Repository navigation
chore: migrate to Grails 8.0.0-M5 and re-sync grails-plugin-template - #50
Merged
Merged
Conversation
Moves the build onto the Grails 8 platform: Grails 8.0.0-M5, Groovy 5.0.8, Spring Boot 4.1, Java 21 and Gradle 9.6.0. - `.sdkmanrc`, the Gradle wrapper and the docs are bumped to the Grails 8 toolchain. CI derives its JDK from `.sdkmanrc`, so no workflow change is needed; dependabot's Gradle ceiling moves from 9 to 10. - `config.grails-plugin` replaces the removed `springDependencyManagement` flag with `bom = null`, its Grails 8 equivalent. - `config.docs` registers the aggregate Groovydoc task on the plugin project. It resolves that project's compile and groovy classpaths, which Gradle 9 no longer allows from a task owned by the root project. - The `grails.mime` blocks are dropped from both `application.yml` files. Grails 8 supplies exactly these defaults and honours the Accept header for every user agent. - `jansi` is no longer managed by the Grails BOM, so it is dropped from the example app. - The example app gains `grails-rest-transforms`. The plugin's controller is compiled with the RestResponder trait, so it is needed to boot the app, not just to run its tests. This was already broken before the migration; only the integration tests supplied the module, via `grails-testing-support-web`. - The plugin's `logback.xml` uses `conversionRule class`, replacing the attribute logback 1.5 deprecated.
Replays the template's files-sync.yml against the current grails-plugin-template, which greenmail had drifted well behind. What the sync brings in: - `.github/scripts/verify-repository.groovy` and the `verify` job that runs it ahead of the build in `ci.yml`. It reports warnings only here, no errors. - `ci.yml` no longer passes `-PskipCodeStyle` on the build-with-tests step, so CodeNarc and Checkstyle now run in CI. Both are clean. - `config.example-app` applies `config.code-coverage`, so the example app's integration tests now contribute to the aggregated coverage report. - `config.publish` applies `config.project-metadata` itself, and `config.publish-root` takes the Maven group from a new `projectGroup` property rather than hardcoding it. `plugin` and `docs` follow suit. `verify-repository.groovy` requires that property too. - Restored the "do not edit directly" headers on the convention plugins that had lost them, plus update-versions/update-contributors robustness fixes. Two deliberate divergences from a literal sync: - `stale.yml` becomes `local-stale.yml`. It is not a template workflow, and the workflow sync is an rsync `--delete` that spares only the `local-*.yml` names. - `gradle/` is not synced. It would downgrade the wrapper from 9.6.0 to the template's 8.14.4, and it is the one synced tree the `.lock` convention does not cover. The `.lock` files pin what must not come from a Grails 7 template: `.sdkmanrc`, `gradlew`, `gradlew.bat`, `dependabot.yml`, `config.grails-plugin`, `config.docs` and `config.code-coverage`. All but `CONTRIBUTING.md` are temporary and should be dropped once the template itself is on Grails 8. `config.code-coverage` needed a fix of its own to survive the sync: the jacoco plugin contributes its agent and ant coordinates through `defaultDependencies`, which Gradle skips once a configuration has any dependency of its own. Grails 8 applies the Grails BOM to every declarable configuration, `jacocoAgent` included, so the fallback never fired and `:app1:integrationTest` failed with an empty agent configuration. The coordinates are now declared outright.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves the plugin onto Grails 8.0.0-M5, and brings the repo back up to date with
grails-plugin-template. Two commits, reviewable independently.1.
chore: migrate to Grails 8.0.0-M5Grails 8.0.0-M5, Groovy 5.0.8, Spring Boot 4.1, Java 21, Gradle 9.6.0 — the toolchain
versions are taken from
grails-coreatv8.0.0-M5. CI derives its JDK from.sdkmanrc,so no workflow change was needed.
Breakages found and fixed along the way:
springDependencyManagement = falseis deprecated in Grails 8 →bom = null.docsfailed outright on Gradle 9: the root project'saggregateGroovyApiDocresolved:greenmail's compile and groovy classpaths, which is no longer allowed across projects.The Groovydoc task now lives on the plugin project; the output layout is unchanged.
jansiis no longer in the Grails BOM, so the unversioned dependency broke configurationof the example app.
grails.mimeblocks are gone. Grails 8 ships exactly the list they declared, andhonours the
Acceptheader for every user agent now.conversionRule converterClass→class.Also fixes a pre-existing bug the migration surfaced:
:app1:bootRunfailed withNoClassDefFoundError: grails.artefact.controller.RestResponder. The plugin's controllercarries the RestResponder trait, but the example app hand-lists Grails modules and omitted
grails-rest-transforms— onlygrails-testing-support-websupplied it, so the testspassed while the app could not boot. This fails identically on
7.0.x; it is not amigration regression.
2.
chore: sync common files from grails-plugin-templateReplays the template's own
files-sync.ymllogic rather than hand-picking files.Brings in
verify-repository.groovyand theverifyCI job that gates the build on it;config.example-appapplyingconfig.code-coverage(so the example app's integrationtests now feed the aggregated coverage report);
config.publishself-applyingconfig.project-metadata;config.publish-roottaking the Maven group from a newprojectGroupproperty instead of hardcoding it; restored "do not edit directly" headers;and robustness fixes in the update-versions / update-contributors scripts.
ci.ymlalso stops passing-PskipCodeStyleon the build-with-tests step, so CodeNarcand Checkstyle now run in CI for the first time. Both are clean.
Two deliberate divergences from a literal sync:
stale.yml→local-stale.yml. It is not a template workflow, and the workflow sync isan rsync
--deletethat spares only thelocal-*.ymlnames.gradle/is not synced — it would downgrade the wrapper from 9.6.0 back to thetemplate's 8.14.4.
One real breakage the sync caused
config.example-apppulling inconfig.code-coveragemade:app1:integrationTestfailwith
Expected configuration ':app1:jacocoAgent' to contain exactly one file, however, it contains no files.The jacoco plugin contributes its agent and ant coordinates throughdefaultDependencies, which Gradle skips once a configuration has any dependency of itsown — and Grails 8 applies the Grails BOM to every declarable configuration,
jacocoAgentincluded, so the fallback never fires. The plugin project was unaffected onlybecause
config.grails-pluginsetsbom = null.config.code-coveragenow declares thecoordinates outright.
Verification
Green from clean on JDK 21 / Gradle 9.6.0:
./gradlew build docs— 12 unit tests, 11 integration tests, CodeNarc and Checkstyle./gradlew publishToMavenLocal— still publishesio.github.gpc:greenmailgroovy .github/scripts/verify-repository.groovy— no errors:app1:bootRunon a real port, hitting/greenmail/list(200text/html) and/greenmail/list.json(200application/json)spring-boot-properties-migratorattached: no warnings. It was removedagain before this branch was committed.
Follow-ups, not in this PR
grails-plugin-template:bom = null, the Gradle 9config.docsfix, and the jacocodefaultDependenciesfix. Every template repo will hitall three the moment the template moves to Grails 8. The jacoco one is the most urgent.
files-sync.ymlrsyncsgradle/unconditionally. It callslock_excludesfor.github/workflows,.github/scriptsandbuild-logic, but not forgradle/— so the.lockconvention cannot protect the wrapper. Once greenmail is registered in thetemplate's
projects.yml, the first sync would silently downgrade its wrapper and breakthe build.
.lockfiles here pin what must not come from a Grails 7 template. All exceptCONTRIBUTING.md.lockare temporary and should be deleted once the template is onGrails 8.
CONTRIBUTING.mdlinks the licence asLICENSE, but the file isLICENSE.txt. Thetemplate's generic copy gets this right; ours is pinned, so it keeps the dead link.
.agents/skills/enhance-plugin-with-template/is stale here and arguably template-only —the sync neither updates nor removes it.