build.gradle.kts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. // context "leak" here is intentional: spring-integration instrumentation will always override
  5. // "local" span context with one extracted from the incoming message when it decides to start a
  6. // CONSUMER span
  7. extra["failOnContextLeak"] = false
  8. muzzle {
  9. pass {
  10. group.set("org.springframework.integration")
  11. module.set("spring-integration-core")
  12. versions.set("[4.1.0.RELEASE,)")
  13. assertInverse.set(true)
  14. }
  15. }
  16. dependencies {
  17. implementation(project(":instrumentation:spring:spring-integration-4.1:library"))
  18. library("org.springframework.integration:spring-integration-core:4.1.0.RELEASE")
  19. testInstrumentation(project(":instrumentation:rabbitmq-2.7:javaagent"))
  20. testInstrumentation(project(":instrumentation:spring:spring-rabbit-1.0:javaagent"))
  21. testImplementation(project(":instrumentation:spring:spring-integration-4.1:testing"))
  22. testLibrary("org.springframework.boot:spring-boot-starter-test:1.5.22.RELEASE")
  23. testLibrary("org.springframework.boot:spring-boot-starter:1.5.22.RELEASE")
  24. testLibrary("org.springframework.cloud:spring-cloud-stream:2.2.1.RELEASE")
  25. testLibrary("org.springframework.cloud:spring-cloud-stream-binder-rabbit:2.2.1.RELEASE")
  26. testImplementation("javax.servlet:javax.servlet-api:3.1.0")
  27. }
  28. tasks {
  29. val testWithRabbitInstrumentation by registering(Test::class) {
  30. filter {
  31. includeTestsMatching("SpringIntegrationAndRabbitTest")
  32. isFailOnNoMatchingTests = false
  33. }
  34. include("**/SpringIntegrationAndRabbitTest.*")
  35. jvmArgs("-Dotel.instrumentation.rabbitmq.enabled=true")
  36. jvmArgs("-Dotel.instrumentation.spring-rabbit.enabled=true")
  37. }
  38. named<Test>("test") {
  39. dependsOn(testWithRabbitInstrumentation)
  40. filter {
  41. excludeTestsMatching("SpringIntegrationAndRabbitTest")
  42. isFailOnNoMatchingTests = false
  43. }
  44. jvmArgs("-Dotel.instrumentation.rabbitmq.enabled=false")
  45. jvmArgs("-Dotel.instrumentation.spring-rabbit.enabled=false")
  46. }
  47. withType<Test>().configureEach {
  48. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  49. usesService(gradle.sharedServices.registrations["testcontainersBuildService"].getService())
  50. }
  51. }