build.gradle.kts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. dependencies {
  14. compileOnly(project(":instrumentation-annotations-support"))
  15. compileOnly(project(":javaagent-tooling"))
  16. // this instrumentation needs to do similar shading dance as opentelemetry-api-1.0 because
  17. // the @WithSpan annotation references the OpenTelemetry API's SpanKind class
  18. //
  19. // see the comment in opentelemetry-api-1.0.gradle for more details
  20. compileOnly(project(":opentelemetry-ext-annotations-shaded-for-instrumenting", configuration = "shadow"))
  21. // Used by byte-buddy but not brought in as a transitive dependency.
  22. compileOnly("com.google.code.findbugs:annotations")
  23. testCompileOnly("com.google.code.findbugs:annotations")
  24. testImplementation("io.opentelemetry:opentelemetry-extension-annotations")
  25. testImplementation(project(":instrumentation-annotations-support"))
  26. testImplementation("net.bytebuddy:byte-buddy")
  27. }
  28. tasks {
  29. compileTestJava {
  30. options.compilerArgs.add("-parameters")
  31. }
  32. test {
  33. jvmArgs("-Dotel.instrumentation.opentelemetry-annotations.exclude-methods=io.opentelemetry.test.annotation.TracedWithSpan[ignored]")
  34. }
  35. }