jamesfredley opened a new pull request, #25:
URL: https://github.com/apache/grails-gradle-publish/pull/25
## Summary
Initial work on the `1.0.x` branch. Upgrades the build to **Gradle 9.4.1**
(from 8.14.3) and bumps the project version to **1.0.0-SNAPSHOT** (from
0.0.5-SNAPSHOT), establishing `1.0.x` as the 1.0 development line.
## Why
`1.0.x` currently mirrors `main` at `0.0.5-SNAPSHOT`. Moving to Gradle 9 and
a 1.0 version stream needs to happen before any further 1.0-targeted work
lands. This PR is the foundation that subsequent 1.0.x PRs will build on.
Gradle 9 is a major release: it bundles **Groovy 4.0** (replacing 3.0),
removes the legacy **Software Model** tasks, and tightens several validation
rules. Some of these changes require corresponding updates in this project's
build scripts and plugin source.
## Changes
### Commit 1 - `chore: upgrade Gradle to 9.4.1` (9 files)
**Wrapper / toolchain**
- `.sdkmanrc`: `gradle=8.14.3` → `gradle=9.4.1`
- `gradle/wrapper/gradle-wrapper.properties`: distribution URL to
`gradle-9.4.1-bin.zip`
- `gradle/wrapper/gradle-wrapper.jar`, `gradlew`, `gradlew.bat`: regenerated
via `./gradlew wrapper --gradle-version 9.4.1`
**Groovy 4 migration**
- `plugin/build.gradle`: switch Groovy coordinates from
`org.codehaus.groovy` (3.x) to `org.apache.groovy` (4.x) to match the Groovy
version bundled with Gradle 9.
- `api
platform('org.codehaus.groovy:groovy-bom:\${GroovySystem.version}')` → `api
platform('org.apache.groovy:groovy-bom:\${GroovySystem.version}')`
- `compileOnly 'org.codehaus.groovy:groovy'` → `compileOnly
'org.apache.groovy:groovy'`
- Without this change, the build fails with `Could not find
org.codehaus.groovy:groovy-bom:4.0.29` because 4.x artifacts are only published
under `org.apache.groovy`.
- `gradle/test-config.gradle`: Spock `2.3-groovy-3.0` → `2.3-groovy-4.0`
(both `test` and `functionalTest` suites). The 3.0-compiled Spock compiler
plugin refuses to load under Groovy 4 with `IncompatibleGroovyVersionException`.
**Internal API / test fixture updates**
- `plugin/src/main/groovy/.../GrailsPublishExtension.groovy`: remove unused
import
`org.gradle.api.publish.maven.internal.publication.DefaultMavenPomDeveloper`.
This internal class was reorganized/removed in Gradle 9; the code never
actually referenced it, so deleting the import is sufficient.
- `plugin/src/test/groovy/.../GrailsPublishGradlePluginTest.groovy`: remove
`components`, `dependentComponents`, and `model` from the expected task-name
lists in both `evaluate:` scenarios. These tasks belonged to the legacy
Software Model, which was removed in Gradle 9.
### Commit 2 - `chore: bump version to 1.0.0-SNAPSHOT` (1 file)
- `gradle.properties`: `projectVersion=0.0.5-SNAPSHOT` →
`projectVersion=1.0.0-SNAPSHOT`
Kept as a separate commit so the version bump is trivially revertable and so
the Gradle upgrade stands on its own logical diff.
## Compatibility of existing plugins with Gradle 9.4.1
Confirmed via the Gradle 9 upgrade guide and surfaced during build runs:
| Plugin | Pinned version | Gradle 9.4.1 |
| --- | --- | --- |
| `io.github.gradle-nexus.publish-plugin` | `2.0.0` | compatible |
| `org.gradle.crypto.checksum` | `1.4.0` | compatible |
| `org.nosphere.apache.rat` | `0.8.1` | works; emits one deprecation warning
(`ReportingExtension.file(String)`, scheduled for removal in Gradle 10).
Non-blocking - flagged for a future Gradle 10 migration PR. |
| `com.gradle.develocity` | `4.1` | compatible |
| `com.gradle.common-custom-user-data-gradle-plugin` | `2.3` | compatible |
## Verification
Every CI command was executed locally on the freshly regenerated wrapper
against the final committed tree.
| CI workflow / step | Command | Result |
| --- | --- | --- |
| `ci.yaml` build matrix (Java 17) | `./gradlew clean build --continue
--stacktrace --rerun-tasks --warning-mode all` | BUILD SUCCESSFUL |
| `ci.yaml` build matrix (Java 21) | same, `JAVA_HOME=corretto-21` | BUILD
SUCCESSFUL |
| `rat.yaml` | `./gradlew rat --warning-mode all` | BUILD SUCCESSFUL |
| `ci.yaml` publish | `./gradlew
publishAllPublicationsToTestCaseMavenRepoRepository aggregateChecksums
aggregatePublishedArtifacts` (local no-credentials target; real repo uses
\`MAVEN_PUBLISH_USERNAME\`/\`PASSWORD\` from secrets) | BUILD SUCCESSFUL,
`CHECKSUMS.txt` and `PUBLISHED_ARTIFACTS.txt` generated with `1.0.0-SNAPSHOT`
coordinates |
| `ci.yaml` snapshot docs | `./gradlew grails-publish:groovydoc` | BUILD
SUCCESSFUL |
| `release.yaml` first step | `./gradlew assemble` | BUILD SUCCESSFUL |
### Test results on final tree
```
plugin/build/test-results/test/TEST-...GrailsPublishGradlePluginTest.xml:
tests=\"5\" skipped=\"0\" failures=\"0\" errors=\"0\"
plugin/build/test-results/functionalTest/TEST-...GrailsPublishPluginSpec.xml:
tests=\"39\" skipped=\"6\" failures=\"0\" errors=\"0\"
```
The 6 skipped functional tests are milestone-version scenarios that are
gated by pre-existing `SKIP` logic (unchanged by this PR).
### Deprecations
- **Our code**: none. Running with `--warning-mode all` produces no
deprecation warnings from anything in this repo.
- **Transitive**: `org.nosphere.apache.rat:0.8.1` emits one warning
(`ReportingExtension.file(String)` → to be replaced by
`getBaseDirectory().file(String)` in Gradle 10). Documented above; left as-is
for a future dedicated Gradle 10 readiness PR.
## Follow-ups (not in this PR)
- Bump `org.nosphere.apache.rat` when a Gradle-10-ready release is published.
- Consider evaluating `org.gradle.crypto.checksum` for a similar refresh.
- Re-run the reproducible-build path (`SOURCE_DATE_EPOCH=... ./gradlew build
-PskipTests`) end-to-end once this lands to confirm Gradle 9 does not regress
reproducibility.
Assisted-by: claude-code:claude-opus-4
--
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]