@@ -26,26 +26,38 @@ dependencies {
26
26
exclude(" org.codehaus.groovy" , " groovy" )
27
27
}
28
28
29
- // the latest version of apache shenyu uses spring-boot 2.7
30
- latestDepTestLibrary(" org.springframework.boot:spring-boot-starter-test:2.7 .+" ) // related dependency
29
+ // the latest version of apache shenyu uses spring-boot 3.3
30
+ latestDepTestLibrary(" org.springframework.boot:spring-boot-starter-test:3.3 .+" ) // related dependency
31
31
32
32
testInstrumentation(project(" :instrumentation:netty:netty-4.1:javaagent" ))
33
33
}
34
34
35
+ val latestDepTest = findProperty(" testLatestDeps" ) as Boolean
36
+
37
+ // spring 6 (spring boot 3) requires java 17
38
+ if (latestDepTest) {
39
+ otelJava {
40
+ minJavaVersionSupported.set(JavaVersion .VERSION_17 )
41
+ }
42
+ }
43
+
35
44
tasks.withType<Test >().configureEach {
36
45
jvmArgs(" -Dotel.instrumentation.apache-shenyu.experimental-span-attributes=true" )
37
46
38
47
// required on jdk17
39
48
jvmArgs(" --add-opens=java.base/java.lang=ALL-UNNAMED" )
40
49
jvmArgs(" -XX:+IgnoreUnrecognizedVMOptions" )
41
50
42
- systemProperty(" testLatestDeps" , findProperty( " testLatestDeps " ) as Boolean )
51
+ systemProperty(" testLatestDeps" , latestDepTest )
43
52
}
44
53
45
- configurations.testRuntimeClasspath {
46
- resolutionStrategy {
47
- // requires old logback (and therefore also old slf4j)
48
- force(" ch.qos.logback:logback-classic:1.2.11" )
49
- force(" org.slf4j:slf4j-api:1.7.36" )
54
+ // spring 6 (spring boot 3) uses slf4j 2.0
55
+ if (! latestDepTest) {
56
+ configurations.testRuntimeClasspath {
57
+ resolutionStrategy {
58
+ // requires old logback (and therefore also old slf4j)
59
+ force(" ch.qos.logback:logback-classic:1.2.11" )
60
+ force(" org.slf4j:slf4j-api:1.7.36" )
61
+ }
50
62
}
51
63
}
0 commit comments