Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ca495ab
feat: replace Spring Dependency Management plugin with Gradle platfor…
jamesfredley Feb 26, 2026
531041b
Address review: add XInclude hardening and extract interpolation dept…
jamesfredley Feb 26, 2026
5e89656
fix: apply grails-bom platform to all declarable configurations
jamesfredley Feb 26, 2026
1a2cea3
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Mar 20, 2026
30a46f6
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Mar 21, 2026
96fea95
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Mar 21, 2026
5607ddb
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Mar 21, 2026
575b77f
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Mar 30, 2026
a4511eb
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Mar 31, 2026
28a6817
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Apr 16, 2026
77932f2
fix: allow Micronaut BOM validator to coexist with plugin-injected pl…
jamesfredley Apr 16, 2026
54fbe93
fix: exclude annotation-processor configurations from grails-bom plat…
jamesfredley Apr 16, 2026
4d1bcdb
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Apr 24, 2026
90c1238
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Apr 26, 2026
a2363ae
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Apr 26, 2026
f0c1934
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Apr 29, 2026
2ca302b
Extract BOM property overrides into a standalone Gradle plugin (PR #1…
jamesfredley Apr 29, 2026
bbf5e53
Fix GrailsDependencyValidatorPlugin to prefer enforcedPlatform BOM
jamesfredley Apr 29, 2026
9204972
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Apr 29, 2026
0178a10
Merge branch '8.0.x' into feat/gradle-managed-version-overrides
jamesfredley Apr 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grails-bom/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ ext {
ExtractedDependencyConstraint extractedConstraint = propertyNameCalculator.calculate(groupId, artifactId, inlineVersion, isBom)
if (extractedConstraint?.versionPropertyReference) {
// use the property reference instead of the hard coded version so that it can be
// overriden by the spring boot dependency management plugin
// overridden by project properties (gradle.properties or ext['property.name'])
dep.version[0].value = extractedConstraint.versionPropertyReference

// Add an entry in the <properties> node with the actual version number
Expand Down
1 change: 0 additions & 1 deletion grails-data-graphql/examples/spring-boot-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ buildscript {
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.apache.grails.buildsrc.dependency-validator'

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,26 @@ dependencies {

Note that version numbers are not present in the majority of the dependencies.

This is thanks to the Spring dependency management plugin which automatically configures `grails-bom` as a Maven BOM via the Grails Gradle Plugin. This defines the default dependency versions for most commonly used dependencies and plugins.
This is thanks to Gradle's platform support which automatically imports `grails-bom` as a managed dependency platform via the Grails Gradle Plugin. This defines the default dependency versions for most commonly used dependencies and plugins.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The versions are only supported by your plugin. Also, the dependency management plugin causes the bom versions to resolve to the spring version and not to the highest version. We should discuss this side effect in the weekly

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 2ca302b. The relevant section in grails-doc/src/en/guide/commandLine/gradleBuild/gradleDependencies.adoc now:

  1. Explicitly calls out that the property-override mechanism is a feature of the new org.apache.grails.gradle.bom-property-overrides plugin and links to Support overriding BOM version properties with ext gradle/gradle#9160 so readers know it isn't native Gradle behaviour.

  2. Adds a NOTE block describing the resolution side effect you raised: the plugin participates in Gradle's standard conflict resolution, so when an artifact is requested at multiple versions Gradle's highest-version-wins picks the version, and the property-override pins what wins after that. This contrasts with the legacy Spring DM plugin which forced BOM versions unconditionally and could mask transitive drift. enforcedPlatform(grails-bom) is documented as the escape hatch for stricter behaviour.

  3. Also documents how the new plugin can be applied standalone (non-Grails projects) so the property-override workflow isn't tied to grails-bom.

Happy to refine the side-effect wording further after the weekly discussion - leaving this thread open in case you want to expand on it.


To override a managed version, set the corresponding property in `gradle.properties` or `build.gradle`:
[source,groovy]
----
// gradle.properties
slf4j.version=1.7.36

// or build.gradle
ext['slf4j.version'] = '1.7.36'
----

For a Grails App, applying `org.apache.grails.gradle.grails-web` will automatically configure the `grails-bom`. No other steps required.

For Plugins and Projects which do not use `org.apache.grails.gradle.grails-web`, you can apply the `grails-bom` in one of the following two ways.
For Plugins and Projects which do not use `org.apache.grails.gradle.grails-web`, you can apply the `grails-bom` using Gradle Platforms:

build.gradle, using Gradle Platforms:
[source,groovy]
----
dependencies {
implementation platform("org.apache.grails:grails-bom:{GrailsVersion}")
//...
}
----

build.gradle, using Spring dependency management plugin:
[source,groovy]
----
dependencyManagement {
imports {
mavenBom 'org.apache.grails:grails-bom:{GrailsVersion}'
}
applyMavenExclusions false
}
----
1 change: 0 additions & 1 deletion grails-gradle/plugins/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ dependencies {
implementation "${gradleBomDependencies['grails-publish-plugin']}"
implementation 'org.springframework.boot:spring-boot-gradle-plugin'
implementation 'org.springframework.boot:spring-boot-loader-tools'
implementation 'io.spring.gradle:dependency-management-plugin'

// Testing - Gradle TestKit is auto-added by java-gradle-plugin
testImplementation('org.spockframework:spock-core') { transitive = false }
Expand Down
Loading
Loading