Minimize scope of version management for commons-compress

See gh-39368
This commit is contained in:
Andy Wilkinson
2024-02-06 15:08:15 +00:00
parent 84e390af70
commit 5ae533a00d
7 changed files with 37 additions and 15 deletions

View File

@@ -19,6 +19,17 @@ configurations.all {
if (dependency.requested.group.equals("org.springframework")) {
dependency.useVersion("6.0.10")
}
// We manage the version of commons-compress here rather than
// in spring-boot-parent to minimize conflicts with Testcontainers
if (dependency.requested.group.equals("org.apache.commons")
&& dependency.requested.name.equals("commons-compress")) {
dependency.useVersion("$commonsCompressVersion")
}
// Downgrade Testcontainers for compatibility with the managed
// version of Commons Compress.
if (dependency.requested.group.equals("org.testcontainers")) {
dependency.useVersion("1.19.3")
}
}
}
}
@@ -27,7 +38,7 @@ dependencies {
api("com.fasterxml.jackson.core:jackson-databind")
api("com.fasterxml.jackson.module:jackson-module-parameter-names")
api("net.java.dev.jna:jna-platform")
api("org.apache.commons:commons-compress")
api("org.apache.commons:commons-compress:$commonsCompressVersion")
api("org.apache.httpcomponents.client5:httpclient5")
api("org.springframework:spring-core")
api("org.tomlj:tomlj:1.0.0")

View File

@@ -28,6 +28,17 @@ configurations {
if (dependency.requested.group.equals("org.springframework")) {
dependency.useVersion("6.0.10")
}
// We manage the version of commons-compress here rather than
// in spring-boot-parent to minimize conflicts with Testcontainers
if (dependency.requested.group.equals("org.apache.commons")
&& dependency.requested.name.equals("commons-compress")) {
dependency.useVersion("$commonsCompressVersion")
}
// Downgrade Testcontainers for compatibility with the managed
// version of Commons Compress.
if (dependency.requested.group.equals("org.testcontainers")) {
dependency.useVersion("1.19.3")
}
}
}
}
@@ -39,7 +50,7 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
implementation("io.spring.gradle:dependency-management-plugin")
implementation("org.apache.commons:commons-compress")
implementation("org.apache.commons:commons-compress:$commonsCompressVersion")
implementation("org.springframework:spring-core")
optional("org.graalvm.buildtools:native-gradle-plugin")

View File

@@ -17,7 +17,7 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-compiler-runner:$kotlinVersion")
implementation("org.jetbrains.kotlin:kotlin-daemon-client:$kotlinVersion")
implementation("org.apache.commons:commons-compress")
implementation("org.apache.commons:commons-compress:$commonsCompressVersion")
implementation("org.assertj:assertj-core")
}

View File

@@ -29,13 +29,19 @@ configurations {
if (dependency.requested.group.equals("org.springframework")) {
dependency.useVersion("6.0.10")
}
// We manage the version of commons-compress here rather than
// in spring-boot-parent to minimize conflicts with Testcontainers
if (dependency.requested.group.equals("org.apache.commons")
&& dependency.requested.name.equals("commons-compress")) {
dependency.useVersion("$commonsCompressVersion")
}
}
}
}
}
dependencies {
api("org.apache.commons:commons-compress")
api("org.apache.commons:commons-compress:$commonsCompressVersion")
api("org.springframework:spring-core")
compileOnly("ch.qos.logback:logback-classic")