diff --git a/instrumentation/spring/spring-kafka-2.7/javaagent/build.gradle.kts b/instrumentation/spring/spring-kafka-2.7/javaagent/build.gradle.kts index 0d474cd589df..466774f5cf6e 100644 --- a/instrumentation/spring/spring-kafka-2.7/javaagent/build.gradle.kts +++ b/instrumentation/spring/spring-kafka-2.7/javaagent/build.gradle.kts @@ -29,10 +29,7 @@ dependencies { testLibrary("org.springframework.boot:spring-boot-starter-test:2.5.3") testLibrary("org.springframework.boot:spring-boot-starter:2.5.3") - - // tests don't work with spring boot 4 yet - latestDepTestLibrary("org.springframework.boot:spring-boot-starter-test:3.+") // documented limitation - latestDepTestLibrary("org.springframework.boot:spring-boot-starter:3.+") // documented limitation + latestDepTestLibrary("org.springframework.boot:spring-boot-starter-kafka:latest.release") } val latestDepTest = findProperty("testLatestDeps") as Boolean @@ -46,10 +43,14 @@ testing { // the "library" configuration is not recognized by the test suite plugin val springKafkaVersion = if (latestDepTest) "latest.release" else "2.7.0" - val springBootVersion = if (latestDepTest) "3.+" else "2.5.3" + val springBootVersion = if (latestDepTest) "latest.release" else "2.5.3" implementation("org.springframework.kafka:spring-kafka:$springKafkaVersion") implementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion") implementation("org.springframework.boot:spring-boot-starter:$springBootVersion") + + if (latestDepTest) { + implementation("org.springframework.boot:spring-boot-starter-kafka:latest.release") + } } targets {