Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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'

dependencies {
implementation platform(project(':grails-bom'))
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.

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