build.gradle.kts 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("io.projectreactor")
  7. module.set("reactor-core")
  8. versions.set("[3.1.0.RELEASE,)")
  9. extraDependency("io.opentelemetry:opentelemetry-api:1.0.0")
  10. assertInverse.set(true)
  11. excludeInstrumentationName("opentelemetry-api")
  12. }
  13. }
  14. tasks.withType<Test>().configureEach {
  15. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  16. // TODO run tests both with and without experimental span attributes
  17. jvmArgs("-Dotel.instrumentation.reactor.experimental-span-attributes=true")
  18. }
  19. dependencies {
  20. // we compile against 3.4.0, so we could use reactor.util.context.ContextView
  21. // instrumentation is tested against 3.1.0.RELEASE
  22. compileOnly("io.projectreactor:reactor-core:3.4.0")
  23. implementation(project(":instrumentation:reactor:reactor-3.1:library"))
  24. implementation(project(":instrumentation:opentelemetry-api:opentelemetry-api-1.0:javaagent"))
  25. compileOnly(project(":javaagent-tooling"))
  26. compileOnly(project(":instrumentation-annotations-support"))
  27. compileOnly(project(":opentelemetry-api-shaded-for-instrumenting", configuration = "shadow"))
  28. testInstrumentation(project(":instrumentation:opentelemetry-extension-annotations-1.0:javaagent"))
  29. testLibrary("io.projectreactor:reactor-core:3.1.0.RELEASE")
  30. testLibrary("io.projectreactor:reactor-test:3.1.0.RELEASE")
  31. testImplementation(project(":instrumentation-annotations-support-testing"))
  32. testImplementation(project(":instrumentation:reactor:reactor-3.1:testing"))
  33. testImplementation(project(":instrumentation-annotations"))
  34. testImplementation("io.opentelemetry:opentelemetry-extension-annotations")
  35. }
  36. testing {
  37. suites {
  38. val testInitialization by registering(JvmTestSuite::class) {
  39. dependencies {
  40. implementation(project(":instrumentation:reactor:reactor-3.1:library"))
  41. implementation(project(":instrumentation-annotations"))
  42. if (findProperty("testLatestDeps") as Boolean) {
  43. implementation("io.projectreactor:reactor-test:+")
  44. } else {
  45. implementation("io.projectreactor:reactor-test:3.1.0.RELEASE")
  46. }
  47. }
  48. }
  49. }
  50. }
  51. tasks {
  52. check {
  53. dependsOn(testing.suites)
  54. }
  55. }