Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ muzzle {
}
}

val latestDepTest = findProperty("testLatestDeps") as Boolean

dependencies {
compileOnly("com.google.auto.value:auto-value-annotations")
annotationProcessor("com.google.auto.value:auto-value")
Expand All @@ -29,13 +31,9 @@ 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
val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false"

testing {
Expand All @@ -45,9 +43,9 @@ testing {
implementation(project(":instrumentation:spring:spring-kafka-2.7: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"
implementation("org.springframework.kafka:spring-kafka:$springKafkaVersion")
val springKafkaVersion = if (latestDepTest) "org.springframework.boot:spring-boot-starter-kafka:latest.release" else "org.springframework.kafka:spring-kafka:2.7.0"
val springBootVersion = if (latestDepTest) "latest.release" else "2.5.3"
implementation(springKafkaVersion)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when it's a whole different artifact I think I prefer

if (latestDepTest) {
implementation("..")
else {
implementation("..")
}

implementation("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
implementation("org.springframework.boot:spring-boot-starter:$springBootVersion")
}
Expand Down
Loading