build.gradle.kts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("io.projectreactor.kafka")
  7. module.set("reactor-kafka")
  8. versions.set("[1.0.0,)")
  9. assertInverse.set(true)
  10. }
  11. }
  12. dependencies {
  13. compileOnly(project(":muzzle"))
  14. compileOnly("com.google.auto.value:auto-value-annotations")
  15. annotationProcessor("com.google.auto.value:auto-value")
  16. bootstrap(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:bootstrap"))
  17. implementation(project(":instrumentation:kafka:kafka-clients:kafka-clients-common:library"))
  18. implementation(project(":instrumentation:reactor:reactor-3.1:library"))
  19. // using 1.3.0 to be able to implement several new KafkaReceiver methods added in 1.3.3
  20. // @NoMuzzle is used to ensure that this does not break muzzle checks
  21. compileOnly("io.projectreactor.kafka:reactor-kafka:1.3.3")
  22. testInstrumentation(project(":instrumentation:kafka:kafka-clients:kafka-clients-0.11:javaagent"))
  23. testInstrumentation(project(":instrumentation:reactor:reactor-3.1:javaagent"))
  24. testImplementation(project(":instrumentation:reactor:reactor-kafka-1.0:testing"))
  25. testLibrary("io.projectreactor.kafka:reactor-kafka:1.0.0.RELEASE")
  26. latestDepTestLibrary("io.projectreactor:reactor-core:3.4.+")
  27. }
  28. val testLatestDeps = findProperty("testLatestDeps") as Boolean
  29. testing {
  30. suites {
  31. val testV1_3_3 by registering(JvmTestSuite::class) {
  32. dependencies {
  33. implementation(project(":instrumentation:reactor:reactor-kafka-1.0:testing"))
  34. if (testLatestDeps) {
  35. implementation("io.projectreactor.kafka:reactor-kafka:+")
  36. implementation("io.projectreactor:reactor-core:3.4.+")
  37. } else {
  38. implementation("io.projectreactor.kafka:reactor-kafka:1.3.3")
  39. }
  40. }
  41. targets {
  42. all {
  43. testTask.configure {
  44. systemProperty("hasConsumerGroupAndId", true)
  45. }
  46. }
  47. }
  48. }
  49. }
  50. }
  51. tasks {
  52. withType<Test>().configureEach {
  53. usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
  54. jvmArgs("-Dotel.instrumentation.kafka.experimental-span-attributes=true")
  55. jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
  56. }
  57. test {
  58. systemProperty("hasConsumerGroupAndId", testLatestDeps)
  59. }
  60. check {
  61. dependsOn(testing.suites)
  62. }
  63. }