Skip to content

Commit 6f6af66

Browse files
authored
Update to slf4j 2.0.2 (#6774)
~testLatestDeps is failing, see #6791~
1 parent 06b6f0a commit 6f6af66

File tree

18 files changed

+155
-18
lines changed

18 files changed

+155
-18
lines changed

dependencyManagement/build.gradle.kts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@ val CORE_DEPENDENCIES = listOf(
5959
"org.mockito:mockito-core:4.8.0",
6060
"org.mockito:mockito-junit-jupiter:4.8.0",
6161
"org.mockito:mockito-inline:4.8.0",
62-
"org.slf4j:slf4j-api:1.7.36",
63-
"org.slf4j:slf4j-simple:1.7.36",
64-
"org.slf4j:log4j-over-slf4j:1.7.36",
65-
"org.slf4j:jcl-over-slf4j:1.7.36",
66-
"org.slf4j:jul-to-slf4j:1.7.36"
62+
"org.slf4j:slf4j-api:2.0.2",
63+
"org.slf4j:slf4j-simple:2.0.2",
64+
"org.slf4j:log4j-over-slf4j:2.0.2",
65+
"org.slf4j:jcl-over-slf4j:2.0.2",
66+
"org.slf4j:jul-to-slf4j:2.0.2"
6767
)
6868

6969
// See the comment above about why we keep this rather large list.
7070
// There are dependencies included here that appear to have no usages, but are maintained at
7171
// this top level to help consistently satisfy large numbers of transitive dependencies.
7272
val DEPENDENCIES = listOf(
73-
"ch.qos.logback:logback-classic:1.2.11",
73+
"ch.qos.logback:logback-classic:1.3.1", // 1.4+ requires Java 11+
7474
"com.github.stefanbirkner:system-lambda:1.2.1",
7575
"com.github.stefanbirkner:system-rules:1.19.0",
7676
"uk.org.webcompere:system-stubs-jupiter:2.0.1",

instrumentation/apache-camel-2.20/javaagent/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,11 @@ tasks {
7373
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
7474
}
7575
}
76+
77+
configurations.testRuntimeClasspath {
78+
resolutionStrategy {
79+
// requires old logback (and therefore also old slf4j)
80+
force("ch.qos.logback:logback-classic:1.2.11")
81+
force("org.slf4j:slf4j-api:1.7.36")
82+
}
83+
}

instrumentation/dropwizard/dropwizard-testing/build.gradle.kts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,13 @@ dependencies {
1313
testImplementation("com.fasterxml.jackson.module:jackson-module-afterburner")
1414
}
1515

16-
// Requires old Guava. Can't use enforcedPlatform since predates BOM
17-
configurations.testRuntimeClasspath.resolutionStrategy.force("com.google.guava:guava:19.0")
16+
configurations.testRuntimeClasspath {
17+
resolutionStrategy {
18+
// Requires old Guava. Can't use enforcedPlatform since predates BOM
19+
force("com.google.guava:guava:19.0")
20+
21+
// requires old logback (and therefore also old slf4j)
22+
force("ch.qos.logback:logback-classic:1.2.11")
23+
force("org.slf4j:slf4j-api:1.7.36")
24+
}
25+
}

instrumentation/grails-3.0/javaagent/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ configurations.configureEach {
5454
}
5555
}
5656

57+
configurations.testRuntimeClasspath {
58+
resolutionStrategy {
59+
// requires old logback (and therefore also old slf4j)
60+
force("ch.qos.logback:logback-classic:1.2.11")
61+
force("org.slf4j:slf4j-api:1.7.36")
62+
}
63+
}
64+
5765
tasks.withType<Test>().configureEach {
5866
// required on jdk17
5967
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")

instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,11 @@ tasks.withType<Test>().configureEach {
2424
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
2525
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
2626
}
27+
28+
configurations.testRuntimeClasspath {
29+
resolutionStrategy {
30+
// requires old logback (and therefore also old slf4j)
31+
force("ch.qos.logback:logback-classic:1.2.11")
32+
force("org.slf4j:slf4j-api:1.7.36")
33+
}
34+
}

instrumentation/spring/spring-integration-4.1/javaagent/build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ tasks {
7070

7171
withType<Test>().configureEach {
7272
systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
73-
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
73+
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
74+
}
75+
}
76+
77+
configurations.testRuntimeClasspath {
78+
resolutionStrategy {
79+
// requires old logback (and therefore also old slf4j)
80+
force("ch.qos.logback:logback-classic:1.2.11")
81+
force("org.slf4j:slf4j-api:1.7.36")
7482
}
7583
}

instrumentation/spring/spring-integration-4.1/library/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@ tasks {
2222
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
2323
}
2424
}
25+
26+
configurations.testRuntimeClasspath {
27+
resolutionStrategy {
28+
// requires old logback (and therefore also old slf4j)
29+
force("ch.qos.logback:logback-classic:1.2.11")
30+
force("org.slf4j:slf4j-api:1.7.36")
31+
}
32+
}

instrumentation/spring/spring-kafka-2.7/javaagent/build.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,19 @@ tasks {
6565
dependsOn(testing.suites)
6666
}
6767
}
68+
69+
configurations {
70+
listOf(
71+
testRuntimeClasspath,
72+
named("testNoReceiveTelemetryRuntimeClasspath")
73+
)
74+
.forEach {
75+
it.configure {
76+
resolutionStrategy {
77+
// requires old logback (and therefore also old slf4j)
78+
force("ch.qos.logback:logback-classic:1.2.11")
79+
force("org.slf4j:slf4j-api:1.7.36")
80+
}
81+
}
82+
}
83+
}

instrumentation/spring/spring-kafka-2.7/library/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,11 @@ dependencies {
1919
testLibrary("org.springframework.boot:spring-boot-starter-test:2.5.3")
2020
testLibrary("org.springframework.boot:spring-boot-starter:2.5.3")
2121
}
22+
23+
configurations.testRuntimeClasspath {
24+
resolutionStrategy {
25+
// requires old logback (and therefore also old slf4j)
26+
force("ch.qos.logback:logback-classic:1.2.11")
27+
force("org.slf4j:slf4j-api:1.7.36")
28+
}
29+
}

instrumentation/spring/spring-rabbit-1.0/javaagent/build.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ dependencies {
2525

2626
tasks {
2727
test {
28-
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
28+
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
29+
}
30+
}
31+
32+
configurations.testRuntimeClasspath {
33+
resolutionStrategy {
34+
// requires old logback (and therefore also old slf4j)
35+
force("ch.qos.logback:logback-classic:1.2.11")
36+
force("org.slf4j:slf4j-api:1.7.36")
2937
}
3038
}

0 commit comments

Comments
 (0)