Skip to content

Commit 452e8f4

Browse files
committed
simplify
1 parent e02082e commit 452e8f4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ muzzle {
1111
}
1212
}
1313

14-
val latestDepTest = findProperty("testLatestDeps") as Boolean
15-
1614
dependencies {
1715
compileOnly("com.google.auto.value:auto-value-annotations")
1816
annotationProcessor("com.google.auto.value:auto-value")
@@ -34,6 +32,7 @@ dependencies {
3432
latestDepTestLibrary("org.springframework.boot:spring-boot-starter-kafka:latest.release")
3533
}
3634

35+
val latestDepTest = findProperty("testLatestDeps") as Boolean
3736
val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false"
3837

3938
testing {
@@ -43,11 +42,15 @@ testing {
4342
implementation(project(":instrumentation:spring:spring-kafka-2.7:testing"))
4443

4544
// the "library" configuration is not recognized by the test suite plugin
46-
val springKafkaVersion = if (latestDepTest) "org.springframework.boot:spring-boot-starter-kafka:latest.release" else "org.springframework.kafka:spring-kafka:2.7.0"
45+
val springKafkaVersion = if (latestDepTest) "latest.release" else "2.7.0"
4746
val springBootVersion = if (latestDepTest) "latest.release" else "2.5.3"
48-
implementation(springKafkaVersion)
47+
implementation("org.springframework.kafka:spring-kafka:$springKafkaVersion")
4948
implementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
5049
implementation("org.springframework.boot:spring-boot-starter:$springBootVersion")
50+
51+
if (latestDepTest) {
52+
implementation("org.springframework.boot:spring-boot-starter-kafka:latest.release")
53+
}
5154
}
5255

5356
targets {

0 commit comments

Comments
 (0)