build.gradle.kts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("io.opentelemetry")
  7. module.set("opentelemetry-extension-annotations")
  8. versions.set("[0.16.0,)")
  9. skip("0.13.0") // opentelemetry-api has a bad dependency on non-alpha api-metric 0.13.0
  10. assertInverse.set(true)
  11. }
  12. }
  13. val versions: Map<String, String> by project
  14. dependencies {
  15. compileOnly(project(":instrumentation-api-annotation-support"))
  16. compileOnly(project(":javaagent-tooling"))
  17. // this instrumentation needs to do similar shading dance as opentelemetry-api-1.0 because
  18. // the @WithSpan annotation references the OpenTelemetry API's SpanKind class
  19. //
  20. // see the comment in opentelemetry-api-1.0.gradle for more details
  21. compileOnly(project(path = ":opentelemetry-ext-annotations-shaded-for-instrumenting", configuration = "shadow"))
  22. testImplementation("io.opentelemetry:opentelemetry-extension-annotations")
  23. testImplementation(project(":instrumentation-api-annotation-support"))
  24. testImplementation("net.bytebuddy:byte-buddy")
  25. }
  26. tasks {
  27. compileTestJava {
  28. options.compilerArgs.add("-parameters")
  29. }
  30. test {
  31. jvmArgs("-Dotel.instrumentation.opentelemetry-annotations.exclude-methods=io.opentelemetry.test.annotation.TracedWithSpan[ignored]")
  32. }
  33. }