Skip to content

Commit 48ff9cb

Browse files
committed
Merge branch '8.0.x' into 8.1.x
2 parents b1bbb1b + 87231f2 commit 48ff9cb

129 files changed

Lines changed: 19749 additions & 180 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: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more contributor l
1111

1212
## What I Do
1313

14-
- Write and change Gradle build scripts the way **this repository** already does them on `8.0.x` (Gradle **9.8.x**).
14+
- Write and change Gradle build scripts the way **this repository** already does them on `8.0.x` (Gradle **9.9.x**).
1515
- Keep agents off generic Gradle "best practice" when it conflicts with established monorepo patterns.
1616
- Cover composite builds (`build-logic`, `grails-gradle`, `grails-forge`, `end-to-end`), convention plugins, BOM/`platform()` dependency management, test wiring, publishing hooks, and Gradle 9 task-configuration traps learned from recent PRs.
1717
- Make Gradle changes boring, copy-paste consistent, and correct on the first try.
@@ -136,7 +136,7 @@ Presence-based flags (property **present**, value optional) match `skipFunctiona
136136

137137
## Gradle Version Sync (Hard Rule)
138138

139-
Current line: **Gradle 9.8.2** (`distributionUrl` + `gradleToolingApiVersion=9.8.2`). Upstream may already ship a newer 9.8.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.
139+
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.
140140

141141
**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:
142142

@@ -148,13 +148,14 @@ Never unify those casually.
148148
### Preferred bump workflow
149149

150150
1. Set the new Gradle version in **`.sdkmanrc`** (`gradle=…`).
151-
2. Run the bootstrap project (uses a system `gradle` to regenerate shared wrappers from `.sdkmanrc`):
151+
2. Run the bootstrap project with a system `gradle` **of the new version** to regenerate shared wrappers from `.sdkmanrc`. The `wrapper` task copies the jar from the Gradle that runs it, so an older `gradle` writes its own jar next to the new `distributionUrl`:
152152

153153
```bash
154+
sdk env install # installs any missing versions .sdkmanrc names, then switches this shell to them
154155
gradle -p gradle-bootstrap
155156
```
156157

157-
Bootstrap generates the wrapper under `gradle-bootstrap/`, **copies** it to **grails-forge**, **grails-gradle**, and **end-to-end**, then **moves** the generated wrapper into the **repository root**. It also runs `legacyG7Wrapper` so **`end-to-end/legacy-g7-command-plugin` stays on its pinned Grails 7 Gradle version** (currently 8.x - do **not** force it to 9). Root is therefore bootstrap-covered; do not re-list it as a manual step.
158+
Bootstrap overwrites the shared `gradle-wrapper.properties` files, which drops the "keep synced" comments at the top of some of them; restore those. Bootstrap generates the wrapper under `gradle-bootstrap/`, **copies** it to **grails-forge**, **grails-gradle**, and **end-to-end**, then **moves** the generated wrapper into the **repository root**. It also runs `legacyG7Wrapper` so **`end-to-end/legacy-g7-command-plugin` stays on its pinned Grails 7 Gradle version** (currently 8.x - do **not** force it to 9). Root is therefore bootstrap-covered; do not re-list it as a manual step.
158159

159160
3. Manually refresh the locations bootstrap does **not** cover. For each tree, keep the **full** wrapper set in sync (`gradle-wrapper.properties`, `gradle-wrapper.jar`, `gradlew`, `gradlew.bat`) - not properties alone:
160161

@@ -551,7 +552,7 @@ Verify a change with:
551552
# "Configuration cache entry reused"
552553
```
553554

554-
The report is `build/reports/configuration-cache/*/*/configuration-cache-report.html`; its JSON between `// begin-report-data` and `// end-report-data` names the class, closure and field behind each problem.
555+
The report is `build/reports/configuration-cache/*/*/configuration-cache-report.html`; the JSON in its `<script type="application/json" id="diagnostics">` block names the class, closure and field behind each problem. Gradle treats that data as internal and changed its format in 9.9, so expect to adjust anything that reads it.
555556

556557
The `grails-gradle` TestKit specs run every fixture build with the configuration cache and `problems=fail` (`GradleSpecification` writes it into the TestKit Gradle user home). Fixture tasks that inspect the model must read it into providers while configuring and only print in `doLast`; pass `--no-configuration-cache` only to test behavior without it.
557558

@@ -655,16 +656,16 @@ Develocity: `https://develocity.apache.org` - build scans publish when authentic
655656
656657
Use official docs for API signatures and deprecations (pin URLs to the version you are bumping toward):
657658
658-
- [Gradle 9.8 release notes](https://docs.gradle.org/9.8.2/release-notes.html)
659-
- [Upgrading major version 9](https://docs.gradle.org/9.8.2/userguide/upgrading_major_version_9.html)
660-
- [Upgrading within Gradle 9.x](https://docs.gradle.org/9.8.2/userguide/upgrading_version_9.html)
661-
- [Java Library plugin](https://docs.gradle.org/9.8.2/userguide/java_library_plugin.html)
662-
- [Java Platform / BOM](https://docs.gradle.org/9.8.2/userguide/java_platform_plugin.html)
663-
- [Platforms](https://docs.gradle.org/9.8.2/userguide/platforms.html)
664-
- [Sharing build logic via included builds](https://docs.gradle.org/9.8.2/userguide/sharing_build_logic_between_subprojects.html)
665-
- [Task configuration avoidance](https://docs.gradle.org/9.8.2/userguide/task_configuration_avoidance.html)
666-
- [Configuration cache](https://docs.gradle.org/9.8.2/userguide/configuration_cache.html) and its [requirements](https://docs.gradle.org/9.8.2/userguide/configuration_cache_requirements.html)
667-
- [Version catalogs](https://docs.gradle.org/9.8.2/userguide/version_catalogs.html) (docs like them - **this repo does not**)
659+
- [Gradle 9.9 release notes](https://docs.gradle.org/9.9.0/release-notes.html)
660+
- [Upgrading major version 9](https://docs.gradle.org/9.9.0/userguide/upgrading_major_version_9.html)
661+
- [Upgrading within Gradle 9.x](https://docs.gradle.org/9.9.0/userguide/upgrading_version_9.html)
662+
- [Java Library plugin](https://docs.gradle.org/9.9.0/userguide/java_library_plugin.html)
663+
- [Java Platform / BOM](https://docs.gradle.org/9.9.0/userguide/java_platform_plugin.html)
664+
- [Platforms](https://docs.gradle.org/9.9.0/userguide/platforms.html)
665+
- [Sharing build logic via included builds](https://docs.gradle.org/9.9.0/userguide/sharing_build_logic_between_subprojects.html)
666+
- [Task configuration avoidance](https://docs.gradle.org/9.9.0/userguide/task_configuration_avoidance.html)
667+
- [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)
668+
- [Version catalogs](https://docs.gradle.org/9.9.0/userguide/version_catalogs.html) (docs like them - **this repo does not**)
668669
669670
### Docs say X - we do Y
670671

‎.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.8.2
11+
gradle=9.9.0

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ These human-review concerns are intentionally not mechanized; `validateRepositor
123123
| Spring Boot | 4.1.x |
124124
| Spring Framework | 7.0.x |
125125
| Spock | 2.4-groovy-5.0 |
126-
| Gradle | 9.8.x |
126+
| Gradle | 9.9.x |
127127
| Jakarta EE | 10 |
128128

129129
## Project Structure
405 Bytes
Binary file not shown.

‎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.8.2-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.9.0-bin.zip
66
networkTimeout=10000
77
retries=0
88
retryBackOffMs=500

‎build-logic/plugins/build.gradle‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ project.layout.projectDirectory.file('../../gradle.properties').asFile.withInput
3535
}
3636

3737
dependencies {
38+
// Gradle plugins are declared by their implementation artifact, not by their plugin marker
39+
// (<id>:<id>.gradle.plugin). A marker is a POM-only module, so Gradle also requests a jar for it
40+
// that does not exist, and a proxy repository answers that miss from upstream, not from its cache.
3841
implementation "${gradleBomDependencies['grails-publish-plugin']}"
39-
implementation "org.gradle.crypto.checksum:org.gradle.crypto.checksum.gradle.plugin:${gradleProperties.gradleChecksumPluginVersion}"
40-
implementation "org.cyclonedx.bom:org.cyclonedx.bom.gradle.plugin:${gradleProperties.gradleCycloneDxPluginVersion}"
42+
implementation "gradle.plugin.org.gradle.crypto:checksum:${gradleProperties.gradleChecksumPluginVersion}"
43+
implementation "org.cyclonedx:cyclonedx-gradle-plugin:${gradleProperties.gradleCycloneDxPluginVersion}"
4144
implementation "com.github.spotbugs.snom:spotbugs-gradle-plugin:${gradleProperties.spotbugsPluginVersion}"
4245
implementation "org.yaml:snakeyaml:${gradleProperties.snakeyamlVersion}"
4346
// GenerateAutoConfigurationImportsTask reads @AutoConfiguration out of class files rather than

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,29 @@ 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+
}
121144
}
122145
}
123146
}

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

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

5858
then:
59-
repositories.size() == 5
59+
repositories.size() == 6
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)
6566
}
6667

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

9798
then:
98-
dependencyRepositories.size() == 6
99+
dependencyRepositories.size() == 7
99100
dependencyRepositories[0].startsWith('file:')
100101
dependencyRepositories[1].startsWith(MAVEN_CENTRAL)
101102
dependencyRepositories[2].startsWith(GRAILS_RESTRICTED)
@@ -105,10 +106,13 @@ class GrailsRepoSettingsPluginSpec extends Specification {
105106
}
106107

107108
private GradleRunner runner() {
109+
// The plugin adds mavenLocal() whenever GRAILS_INCLUDE_MAVEN_LOCAL is set, whatever its value,
110+
// so the build under test runs without it unless a feature sets it.
108111
GradleRunner.create()
109112
.withProjectDir(projectDir)
110113
.withArguments('help', '--offline', '--stacktrace')
111114
.withPluginClasspath()
115+
.withEnvironment(System.getenv().findAll { it.key != 'GRAILS_INCLUDE_MAVEN_LOCAL' })
112116
}
113117

114118
private static List<String> urls(BuildResult result, String label) {

‎buildSrc/build.gradle‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ plugins {
2525
compileJava.options.release = javaVersion.toString().toInteger()
2626

2727
dependencies {
28+
// Gradle plugins are declared by their implementation artifact, not by their plugin marker
29+
// (<id>:<id>.gradle.plugin). A marker is a POM-only module, so Gradle also requests a jar for it
30+
// that does not exist, and a proxy repository answers that miss from upstream, not from its cache.
2831
implementation platform("org.apache.grails:grails-gradle-bom:$projectVersion")
2932
implementation 'org.apache.grails.gradle:grails-publish'
3033
implementation 'cloud.wondrify:asset-pipeline-gradle'
3134
implementation 'org.apache.grails:grails-docs-core'
3235
implementation 'org.apache.grails:grails-gradle-plugins'
3336
implementation 'org.springframework.boot:spring-boot-gradle-plugin'
34-
implementation "org.nosphere.apache.rat:org.nosphere.apache.rat.gradle.plugin:$apacheRatVersion"
35-
implementation "org.cyclonedx.bom:org.cyclonedx.bom.gradle.plugin:$gradleCycloneDxPluginVersion"
37+
implementation "org.nosphere.apache:creadur-rat-gradle:$apacheRatVersion"
38+
implementation "org.cyclonedx:cyclonedx-gradle-plugin:$gradleCycloneDxPluginVersion"
3639
}

‎dependencies.gradle‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,20 @@ ext {
8686
'groovy.version' : '5.1.3',
8787
// Security: 33.7.2 addresses CVE-2026-102554 (uncontrolled resource consumption).
8888
'guava.version' : '33.7.2-jre',
89-
// Groovy YAML 5.1.0 requires a minimum of Jackson 2.22.1, and 2.22.3 also overrides the
89+
// Groovy YAML 5.1.0 requires a minimum of Jackson 2.22.1, and 2.22.4 also overrides the
9090
// 2.21.7 Spring Boot 4.1.2 manages: it adds the StreamReadConstraints length limit to
9191
// GregorianCalendar/Duration (CVE-2026-68497) and restricts the URI schemes
9292
// java.nio.file.Path deserialization accepts (CVE-2026-19032). Jackson 2 only releases
9393
// jackson-annotations on the minor, hence the separate 2.22 below. 2.22.3 also fixes
94-
// CVE-2026-89425, CVE-2026-89407, CVE-2026-91777 and CVE-2026-91776.
95-
'jackson-2-bom.version' : '2.22.3',
94+
// CVE-2026-89425, CVE-2026-89407, CVE-2026-91777 and CVE-2026-91776, and 2.22.4 fixes
95+
// CVE-2026-110879 (type id validation in jackson-databind), which 2.21.7 does not carry.
96+
'jackson-2-bom.version' : '2.22.4',
9697
'jackson2-annotations.version' : '2.22',
97-
// Security: overrides Jackson 3.1.7 from Spring Boot 4.1.2. The 3.2.3 BOM aligns the family
98-
// and fixes CVE-2026-89425, CVE-2026-89407, CVE-2026-91777 and CVE-2026-91776.
99-
'jackson-bom.version' : '3.2.3',
98+
// Security: overrides Jackson 3.1.7 from Spring Boot 4.1.2. The 3.2.4 BOM aligns the family
99+
// and fixes CVE-2026-89425, CVE-2026-89407, CVE-2026-91777, CVE-2026-91776 and
100+
// CVE-2026-110879, which 3.1.7 does not carry, and CVE-2026-110729, which affects only
101+
// jackson-core 3.2.0 to 3.2.3.
102+
'jackson-bom.version' : '3.2.4',
100103
'jquery.version' : '4.0.0',
101104
// Security: overrides the 1.5.38 Spring Boot 4.1.2 manages. 1.6.3 strips slashes from MDC
102105
// values before SiftingAppender uses them as discriminating keys (CVE-2026-19880), and

0 commit comments

Comments
 (0)