Skip to content

Commit 84980a7

Browse files
committed
Force upgrade to Spring 6 based on Copilot.
1 parent 72f037d commit 84980a7

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

build.gradle

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ plugins {
2727
}
2828

2929
java {
30-
sourceCompatibility = 1.8
31-
targetCompatibility = 1.8
30+
sourceCompatibility = JavaVersion.VERSION_17
31+
targetCompatibility = JavaVersion.VERSION_17
3232
}
3333

3434
repositories {
@@ -44,12 +44,19 @@ configurations {
4444
// Force v4.5.0 of commons-collections4 to avoid CVEs in v4.4.0 from transitive dependecies:
4545
// CVE-2025-48924 (https://www.cve.org/CVERecord?id=CVE-2025-48924) and
4646
// CVE-2020-15250 (https://www.cve.org/CVERecord?id=CVE-2020-15250)
47-
force "org.apache.commons:commons-collections4:4.5.0"
48-
49-
// Force v3.18 of commons-lang3 to avoid CVE-2025-48924
50-
// (https://www.cve.org/CVERecord?id=CVE-2025-48924), without also
51-
// upgrading ml-app-deployer to 6.0.0, which we are not ready to do yet.
52-
force 'org.apache.commons:commons-lang3:3.18.0'
47+
eachDependency { DependencyResolveDetails details ->
48+
if (details.requested.group == 'org.apache.commons' && details.requested.name == 'commons-collections4') {
49+
details.useVersion '4.5.0'
50+
}
51+
if (details.requested.group == 'org.apache.commons' && details.requested.name == 'commons-lang3') {
52+
details.useVersion '3.18.0'
53+
}
54+
if (details.requested.group == 'org.springframework') {
55+
if (['spring-core', 'spring-context', 'spring-beans', 'spring-aop', 'spring-expression', 'spring-web', 'spring-jcl'].contains(details.requested.name)) {
56+
details.useVersion '6.2.11'
57+
}
58+
}
59+
}
5360
}
5461
}
5562
}

0 commit comments

Comments
 (0)