opentelemetry-java-instrume.../instrumentation/kafka-streams-0.11/javaagent/kafka-streams-0.11-javaagen...

46 lines
1.8 KiB
Groovy

apply plugin: "otel.javaagent-instrumentation"
muzzle {
pass {
group = "org.apache.kafka"
module = "kafka-streams"
versions = "[0.11.0.0,)"
}
}
dependencies {
library "org.apache.kafka:kafka-streams:0.11.0.0"
// Include kafka-clients instrumentation for tests.
testInstrumentation project(':instrumentation:kafka-clients-0.11:javaagent')
testLibrary "org.apache.kafka:kafka-clients:0.11.0.0"
testLibrary "org.springframework.kafka:spring-kafka:1.3.3.RELEASE"
testLibrary "org.springframework.kafka:spring-kafka-test:1.3.3.RELEASE"
testImplementation "javax.xml.bind:jaxb-api:2.2.3"
testImplementation "org.mockito:mockito-core"
testLibrary "org.assertj:assertj-core"
// Include latest version of kafka itself along with latest version of client libs.
// This seems to help with jar compatibility hell.
latestDepTestLibrary "org.apache.kafka:kafka_2.11:2.3.+"
// (Pinning to 2.3.x: 2.4.0 introduces an error when executing compileLatestDepTestGroovy)
// Caused by: java.lang.NoClassDefFoundError: org.I0Itec.zkclient.ZkClient
latestDepTestLibrary "org.apache.kafka:kafka-clients:2.3.+"
latestDepTestLibrary "org.apache.kafka:kafka-streams:2.3.+"
latestDepTestLibrary "org.springframework.kafka:spring-kafka:2.2.+"
latestDepTestLibrary "org.springframework.kafka:spring-kafka-test:2.2.+"
// assertj-core:3.20.0 is incompatible with spring-kafka-test:2.7.2
latestDepTestLibrary "org.assertj:assertj-core:3.19.0"
}
tasks.withType(Test).configureEach {
// TODO run tests both with and without experimental span attributes
jvmArgs "-Dotel.instrumentation.kafka.experimental-span-attributes=true"
}
// Requires old version of AssertJ for baseline
if (!testLatestDeps) {
configurations.testRuntimeClasspath.resolutionStrategy.force "org.assertj:assertj-core:2.9.1"
}