Rework dep management to avoid consumers picking up strict constraints
Previously, enforcedPlatform dependencies were using to pull in the constraints defined in spring-boot-dependencies and spring-boot-parent and applied them strictly so that the constrained version had to be used. This worked as intended in Spring Boot's own build but incorrectly enforced those same strict version requirements on external consumers of Spring Boot's modules. This commit reworks how Spring Boot defines its internal dependency management so that platform dependencies are exposed to external consumers while enforced platform dependencies are using internally. See gh-19609
This commit is contained in:
@@ -4,6 +4,7 @@ plugins {
|
||||
id 'org.springframework.boot.conventions'
|
||||
id 'org.springframework.boot.deployed'
|
||||
id 'org.springframework.boot.integration-test'
|
||||
id 'org.springframework.boot.internal-dependency-management'
|
||||
id 'org.springframework.boot.optional-dependencies'
|
||||
}
|
||||
|
||||
@@ -14,13 +15,13 @@ configurations {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation enforcedPlatform(project(':spring-boot-project:spring-boot-dependencies'))
|
||||
api platform(project(':spring-boot-project:spring-boot-dependencies'))
|
||||
|
||||
implementation project(':spring-boot-project:spring-boot')
|
||||
implementation project(':spring-boot-project:spring-boot-autoconfigure')
|
||||
|
||||
intTestDependencies project(':spring-boot-project:spring-boot-starters:spring-boot-starter-web')
|
||||
|
||||
intTestImplementation enforcedPlatform(project(':spring-boot-project:spring-boot-dependencies'))
|
||||
intTestImplementation project(':spring-boot-project:spring-boot-autoconfigure')
|
||||
intTestImplementation project(':spring-boot-project:spring-boot-test')
|
||||
intTestImplementation project(':spring-boot-project:spring-boot-tools:spring-boot-test-support')
|
||||
@@ -31,7 +32,7 @@ dependencies {
|
||||
intTestImplementation 'net.bytebuddy:byte-buddy'
|
||||
intTestRuntimeOnly 'org.springframework:spring-web'
|
||||
|
||||
optional enforcedPlatform(project(':spring-boot-project:spring-boot-dependencies'))
|
||||
optional platform(project(':spring-boot-project:spring-boot-dependencies'))
|
||||
optional 'javax.servlet:javax.servlet-api'
|
||||
optional 'org.apache.derby:derby'
|
||||
optional 'org.hibernate:hibernate-core'
|
||||
|
||||
Reference in New Issue
Block a user