Skip to content

Commit 36efe30

Browse files
committed
Merge branch '9.0.x' into 9.1.x
2 parents a0e89c5 + 7f9a4a0 commit 36efe30

65 files changed

Lines changed: 3387 additions & 157 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.agents/skills/gradle-developer/SKILL.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Presence-based flags (property **present**, value optional) match `skipFunctiona
137137

138138
## Gradle Version Sync (Hard Rule)
139139

140-
Current line: **Gradle 9.9.0** (`distributionUrl` + `gradleToolingApiVersion=9.9.0`). Upstream may already ship a newer 9.9.x patch - this repo rides close to latest **only after** a deliberate multi-location bump PR. Do not "helpfully" jump one wrapper ahead of the rest.
140+
Current line: **Gradle 9.9.1** (`distributionUrl` + `gradleToolingApiVersion=9.9.1`). Upstream may already ship a newer 9.9.x patch - this repo rides close to latest **only after** a deliberate multi-location bump PR. Do not "helpfully" jump one wrapper ahead of the rest.
141141

142142
**Two Groovy stacks:** Gradle itself embeds **Groovy 4** for build logic. Application/runtime code on 8.0.x is **Groovy 5**. That is why `dependencies.gradle` keeps separate maps:
143143

@@ -665,16 +665,16 @@ Develocity: `https://develocity.apache.org` - build scans publish when authentic
665665
666666
Use official docs for API signatures and deprecations (pin URLs to the version you are bumping toward):
667667
668-
- [Gradle 9.9 release notes](https://docs.gradle.org/9.9.0/release-notes.html)
669-
- [Upgrading major version 9](https://docs.gradle.org/9.9.0/userguide/upgrading_major_version_9.html)
670-
- [Upgrading within Gradle 9.x](https://docs.gradle.org/9.9.0/userguide/upgrading_version_9.html)
671-
- [Java Library plugin](https://docs.gradle.org/9.9.0/userguide/java_library_plugin.html)
672-
- [Java Platform / BOM](https://docs.gradle.org/9.9.0/userguide/java_platform_plugin.html)
673-
- [Platforms](https://docs.gradle.org/9.9.0/userguide/platforms.html)
674-
- [Sharing build logic via included builds](https://docs.gradle.org/9.9.0/userguide/sharing_build_logic_between_subprojects.html)
675-
- [Task configuration avoidance](https://docs.gradle.org/9.9.0/userguide/task_configuration_avoidance.html)
676-
- [Configuration cache](https://docs.gradle.org/9.9.0/userguide/configuration_cache.html) and its [requirements](https://docs.gradle.org/9.9.0/userguide/configuration_cache_requirements.html)
677-
- [Version catalogs](https://docs.gradle.org/9.9.0/userguide/version_catalogs.html) (docs like them - **this repo does not**)
668+
- [Gradle 9.9 release notes](https://docs.gradle.org/9.9.1/release-notes.html)
669+
- [Upgrading major version 9](https://docs.gradle.org/9.9.1/userguide/upgrading_major_version_9.html)
670+
- [Upgrading within Gradle 9.x](https://docs.gradle.org/9.9.1/userguide/upgrading_version_9.html)
671+
- [Java Library plugin](https://docs.gradle.org/9.9.1/userguide/java_library_plugin.html)
672+
- [Java Platform / BOM](https://docs.gradle.org/9.9.1/userguide/java_platform_plugin.html)
673+
- [Platforms](https://docs.gradle.org/9.9.1/userguide/platforms.html)
674+
- [Sharing build logic via included builds](https://docs.gradle.org/9.9.1/userguide/sharing_build_logic_between_subprojects.html)
675+
- [Task configuration avoidance](https://docs.gradle.org/9.9.1/userguide/task_configuration_avoidance.html)
676+
- [Configuration cache](https://docs.gradle.org/9.9.1/userguide/configuration_cache.html) and its [requirements](https://docs.gradle.org/9.9.1/userguide/configuration_cache_requirements.html)
677+
- [Version catalogs](https://docs.gradle.org/9.9.1/userguide/version_catalogs.html) (docs like them - **this repo does not**)
678678
679679
### Docs say X - we do Y
680680

‎.github/workflows/gradle.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,3 +1302,8 @@ jobs:
13021302
TARGET_REPOSITORY: 'apache/grails-website'
13031303
TARGET_FOLDER: 'docs'
13041304
DOCUMENTATION_BRANCH: 'asf-site-production'
1305+
# Only the default branch publishes docs/snapshot. Each publish
1306+
# replaces the whole folder, so the branches would overwrite each
1307+
# other, and a publish that overlaps another fails on the rebase.
1308+
# Like the CI and cache policies, this follows the default branch.
1309+
SKIP_SNAPSHOT_FOLDER: ${{ github.ref_name != github.event.repository.default_branch }}

‎.sdkmanrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
java=21.0.12-librca
99
# Keep gradle version synced with gradle.properties (gradleToolingApiVersion).
1010
# Update the gradle-bootstrap project to propagate the version to all gradle-wrapper.properties files.
11-
gradle=9.9.0
11+
gradle=9.9.1

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ GitHub-hosted runner time is shared with every other Apache project, so the work
313313
- Merging a pull request, or labelling it `no ci`, cancels its runs in flight: `cancel-unneeded-pr-runs.yml` cancels the queued, pending and in-progress `pull_request` runs of every open pull request labelled `no ci`, and on a push to a release branch also those of each pull request the pushed commit merged that were created before the merge. A run is kept while an open pull request not labelled `no ci` has the same head commit, and the runs of a merged pull request labelled `run ci` are kept too: on a release branch below the default, the push after the merge builds without the tests, so the tests the label asked for on the pull request are the only ones the change gets there, and a late failure still calls for a follow-up fix. The workflow runs on every push to a release branch and when a pull request is labelled `no ci`, but a `pull_request` run from a fork gets a read-only token that cannot cancel runs, so labelling a fork's pull request skips the job, and that pull request's runs are cancelled by the next push to a release branch. For the same reason merges are found from the push rather than from the pull request being closed. It lists the unfinished `pull_request` runs of the repository once per sweep, not once per pull request, to spare the `GITHUB_TOKEN` rate limit.
314314
- Every workflow that runs tests calls `.github/workflows/ci-policy.yml` as its first job, `policy`, and gates its test jobs (and the test steps of its build jobs) on `needs.policy.outputs.run-tests`. Never test `github.event.head_commit.message` in a workflow: a `pull_request` payload has no such field, so that test silently ran the tests on every pull request. The policy reads the head commit of the push, of the pull request, or of the dispatched branch, and matches the marker against the start of the message's first line. The read is retried with a growing pause; when it still fails, the tests run, as they did before the policy existed, and a warning annotation and the step summary say so, so an API outage costs runner time rather than a test result.
315315
- The tests run by default only on the default branch and the release branches above it, and there a commit message starting with `[skip tests]` skips them. Everywhere else, that is on a release branch below the default (7.0.x, 7.1.x and 7.2.x while 8.0.x is the default) and on a pull request whose base is a side branch rather than a release branch, the tests run only on request: when the commit message starts with `[run tests]`, when the pull request carries the `run ci` label, or when a manual run (`workflow_dispatch`) in `apache/grails-core` has its `run-tests` input ticked. Otherwise the run builds, and on a push publishes snapshots, without tests, exactly like a `[skip tests]` commit; a `[skip tests]` commit also wins over the label and the input. The label is the way to test a backport pull request without rewriting its head commit, and the input is how the commit a release is cut from gets tested (see RELEASE.md); both are read when the run starts. A marker anywhere but at the start of the first line is ignored. The rule follows the default branch: when a new one is promoted, the branches below it stop running tests by default without an edit. The older release branches are kept quiet on purpose: a backport lands as one push to the oldest branch and a merge-up to each branch above it, and its tests belong on the pull request, labelled `run ci`, not on every push after it. Side branches are unreviewed development work (see the review process in CONTRIBUTING.md); their tests run when the branch is proposed to a release branch. In a fork, where the runner time is the fork owner's and not the ASF's, a manual run runs the tests unless the commit message starts with `[skip tests]`.
316-
- The jobs that run no tests (dependency validation, the build-without-tests steps, code style and build health) still run on every push to a release branch and on every non-draft pull request; RAT and CodeQL run on every push to a release branch and on every non-draft pull request into one, since their `pull_request` triggers list only release-branch bases. Only the `no ci` label, or a draft without `run ci`, stops them. The snapshot publish runs on every push to a release branch and on a manual run (the docs publish only on a push), never on a pull request.
316+
- The jobs that run no tests (dependency validation, the build-without-tests steps, code style and build health) still run on every push to a release branch and on every non-draft pull request; RAT and CodeQL run on every push to a release branch and on every non-draft pull request into one, since their `pull_request` triggers list only release-branch bases. Only the `no ci` label, or a draft without `run ci`, stops them. The snapshot publish runs on every push to a release branch and on a manual run (the docs publish only on a push), never on a pull request. Only the default branch publishes its docs, to https://grails.apache.org/docs/snapshot; on every other release branch the `docs` job builds them and publishes nothing. The version folders, such as `docs/8.0.x`, are written only by releases. Each publish replaces the whole folder, so the branches would overwrite each other, and a publish that overlaps another fails. The rule follows the default branch, as it does for the tests.
317317
- The publish jobs in `gradle.yml` (`publishGradle`, `publish`, `publishForge`, `verifyWrapper`, `docs`) run on `always()` and check the result of each job they need explicitly. The explicit checks are needed because the implicit `success()` check covers every job upstream, so a skipped test job would skip them although their own needs succeeded, which is what silently skipped the Forge and docs publish on every `[skip tests]` push. `always()` rather than `!cancelled()` because a newer push to the same branch cancels the run in flight: GitHub stops only the jobs whose `if` turns false, so the build and test jobs stop but a publish that has started completes, since an interrupted upload leaves the snapshot repository with modules from two commits. `publishGradle` waits for every build job (`buildGradle`, `buildForge` and `validateDependencies`), so a cancel that arrives before the builds have finished publishes nothing of that commit. A later cancel lets the publish jobs whose needs have already succeeded or been skipped run: on a run without tests that is the whole chain, and on a run whose tests are still running only `publishGradle`, because a cancelled test job fails the explicit checks of `publish` and of everything after it; a cancel after every test has passed lets the whole chain run as well. The replacing run is pending until the cancelled run has finished every job, so two publishes of the same branch never overlap, and it then publishes the newer commit over whatever the cancelled run published. A normal cancel (the Cancel button or `gh run cancel`) does not stop a running `always()` job either, so a publish stuck on a slow or failing upload, which the retry step around it lets run for hours, holds the run and the branch's concurrency group until it ends; force-cancel the run to stop it: `gh api -X POST repos/apache/grails-core/actions/runs/<run id>/force-cancel`. A job added after the tests follows the same pattern.
318318
- A workflow that gains a test job gets `needs: [ policy ]` and `if: ${{ needs.policy.outputs.run-tests == 'true' }}` on that job; a workflow that gains a non-test job copies the label-and-draft `if` from its sibling jobs. In `gradle.yml`, a new test job also goes into the `needs` of `publish`, with a `success` or `skipped` check, and a new job that builds or validates without tests into those of `publishGradle`, with a `success` check; a job left out is not waited for, so a commit whose job failed or was cancelled is published anyway.
319319

‎build-logic/gradle/wrapper/gradle-wrapper.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# and grails-forge/grails-forge-core/grails-app/views/forge/feature/build/gradle/templates/gradleWrapperProperties.gsp
33
distributionBase=GRADLE_USER_HOME
44
distributionPath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.0-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip
66
networkTimeout=10000
77
retries=0
88
retryBackOffMs=500

‎build-logic/plugins/src/main/groovy/org/apache/grails/buildsrc/GrailsRepoSettingsPlugin.groovy‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -118,29 +118,6 @@ class GrailsRepoSettingsPlugin implements Plugin<Settings> {
118118
it.releasesOnly()
119119
}
120120
}
121-
// These plugins' POMs say Gradle module metadata was published with them, but it never was, so
122-
// Gradle requests a .module file that exists nowhere each time it resolves them without a cached
123-
// result, and a proxy repository answers that miss from upstream. Reading only their POMs,
124-
// straight from the Gradle Plugin Portal that hosts them, skips the request.
125-
repo.exclusiveContent { exclusive ->
126-
exclusive.forRepository {
127-
repo.maven {
128-
url = 'https://plugins.gradle.org/m2'
129-
metadataSources {
130-
it.mavenPom()
131-
it.ignoreGradleMetadataRedirection()
132-
}
133-
mavenContent {
134-
it.releasesOnly()
135-
}
136-
}
137-
}
138-
exclusive.filter {
139-
it.includeModule('io.sdkman', 'gradle-sdkvendor-plugin')
140-
it.includeModule('io.spring.nohttp', 'nohttp-gradle')
141-
it.includeModule('se.patrikerdes', 'gradle-use-latest-versions-plugin')
142-
}
143-
}
144121
}
145122
}
146123
}

‎build-logic/plugins/src/test/groovy/org/apache/grails/buildsrc/GrailsRepoSettingsPluginSpec.groovy‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,12 @@ class GrailsRepoSettingsPluginSpec extends Specification {
5656
List<String> repositories = urls(result, 'DEPENDENCY_REPOSITORIES')
5757

5858
then:
59-
repositories.size() == 6
59+
repositories.size() == 5
6060
repositories[0].startsWith(MAVEN_CENTRAL)
6161
repositories[1].startsWith(GRAILS_RESTRICTED)
6262
repositories[2].startsWith(APACHE_SNAPSHOTS)
6363
repositories[3].startsWith(SONATYPE_SNAPSHOTS)
6464
repositories[4].startsWith(APACHE_STAGING)
65-
repositories[5].startsWith(PLUGIN_PORTAL)
6665
}
6766

6867
void 'plugin repositories start with Maven Central and the plugin portal'() {
@@ -96,7 +95,7 @@ class GrailsRepoSettingsPluginSpec extends Specification {
9695
List<String> pluginRepositories = urls(result, 'PLUGIN_REPOSITORIES')
9796

9897
then:
99-
dependencyRepositories.size() == 7
98+
dependencyRepositories.size() == 6
10099
dependencyRepositories[0].startsWith('file:')
101100
dependencyRepositories[1].startsWith(MAVEN_CENTRAL)
102101
dependencyRepositories[2].startsWith(GRAILS_RESTRICTED)

‎end-to-end/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ neither the core build nor a contributor's default environment inherits a second
142142

143143
| Where | JDK | Why |
144144
|---|---|---|
145-
| `legacy-g7-command-plugin/.sdkmanrc` | 17, Gradle 8.14.6 | What Grails 7 pins, so the fixture is built the way a Grails 7 plugin actually was. `gradle-bootstrap` generates this wrapper from that file via its `legacyG7Wrapper` task, rather than copying the shared one. |
145+
| `legacy-g7-command-plugin/.sdkmanrc` | 17, Gradle 8.14.7 | What Grails 7 pins, so the fixture is built the way a Grails 7 plugin actually was. `gradle-bootstrap` generates this wrapper from that file via its `legacyG7Wrapper` task, rather than copying the shared one. |
146146
| the repository's root `.sdkmanrc` | 21 | The Grails 8 baseline. This build consumes artifacts from the core build, so it runs on whatever the core build runs on — it deliberately does not re-pin that. |
147147

148148
## Running locally

‎end-to-end/gradle/wrapper/gradle-wrapper.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.0-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.1-bin.zip
44
networkTimeout=10000
55
retries=0
66
retryBackOffMs=500
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Matches Grails 7: JDK 17 and Gradle 8.14.6 are what the 7.0.x branch pins.
1+
# Matches Grails 7: JDK 17 and Gradle 8.14.7 are what the 7.0.x branch pins.
22
# Deliberately not synced with the repository root, which tracks Grails 8.
33
java=17.0.18-librca
4-
gradle=8.14.6
4+
gradle=8.14.7

0 commit comments

Comments
 (0)