build.gradle.kts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. id("org.unbroken-dome.test-sets")
  4. }
  5. muzzle {
  6. pass {
  7. group.set("org.apache.kafka")
  8. module.set("kafka-streams")
  9. versions.set("[0.11.0.0,)")
  10. }
  11. }
  12. testSets {
  13. create("latestDepTest")
  14. }
  15. dependencies {
  16. compileOnly("org.apache.kafka:kafka-streams:0.11.0.0")
  17. // Include kafka-clients instrumentation for tests.
  18. testInstrumentation(project(":instrumentation:kafka-clients:kafka-clients-0.11:javaagent"))
  19. testImplementation("org.apache.kafka:kafka-streams:0.11.0.0")
  20. testImplementation("org.apache.kafka:kafka-clients:0.11.0.0")
  21. testImplementation("org.springframework.kafka:spring-kafka:1.3.3.RELEASE")
  22. testImplementation("org.springframework.kafka:spring-kafka-test:1.3.3.RELEASE")
  23. testImplementation("javax.xml.bind:jaxb-api:2.2.3")
  24. testImplementation("org.assertj:assertj-core")
  25. add("latestDepTestImplementation", "org.apache.kafka:kafka_2.13:+")
  26. add("latestDepTestImplementation", "org.apache.kafka:kafka-clients:+")
  27. add("latestDepTestImplementation", "org.apache.kafka:kafka-streams:+")
  28. add("latestDepTestImplementation", "org.springframework.kafka:spring-kafka:+")
  29. add("latestDepTestImplementation", "org.springframework.kafka:spring-kafka-test:+")
  30. }
  31. tasks {
  32. withType<Test>().configureEach {
  33. // TODO run tests both with and without experimental span attributes
  34. jvmArgs("-Dotel.instrumentation.kafka.experimental-span-attributes=true")
  35. }
  36. if (findProperty("testLatestDeps") as Boolean) {
  37. // latestDepTest is still run
  38. named("test") {
  39. enabled = false
  40. }
  41. }
  42. }
  43. // Requires old version of AssertJ for baseline
  44. if (!(findProperty("testLatestDeps") as Boolean)) {
  45. configurations.testRuntimeClasspath.resolutionStrategy.force("org.assertj:assertj-core:2.9.1")
  46. }