build.gradle.kts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. // note that muzzle is not run against the current SNAPSHOT instrumentation-annotations, but this is
  5. // ok because the tests are run against the current SNAPSHOT instrumentation-annotations which will
  6. // catch any muzzle issues in SNAPSHOT instrumentation-annotations
  7. muzzle {
  8. pass {
  9. group.set("io.opentelemetry")
  10. module.set("opentelemetry-instrumentation-annotations")
  11. versions.set("(,)")
  12. }
  13. }
  14. dependencies {
  15. compileOnly(project(":instrumentation-annotations-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(":opentelemetry-instrumentation-annotations-shaded-for-instrumenting", configuration = "shadow"))
  22. testImplementation(project(":instrumentation-annotations"))
  23. testImplementation(project(":instrumentation-annotations-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. }