build.gradle.kts 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. // TODO: add muzzle once 1.4.0 is released
  5. val versions: Map<String, String> by project
  6. dependencies {
  7. compileOnly(project(":instrumentation-api-annotation-support"))
  8. compileOnly(project(":javaagent-tooling"))
  9. // this instrumentation needs to do similar shading dance as opentelemetry-api-1.0 because
  10. // the @WithSpan annotation references the OpenTelemetry API's SpanKind class
  11. //
  12. // see the comment in opentelemetry-api-1.0.gradle for more details
  13. compileOnly(project(path = ":opentelemetry-ext-annotations-shaded-for-instrumenting", configuration = "shadow"))
  14. testImplementation("io.opentelemetry:opentelemetry-extension-annotations")
  15. testImplementation(project(":instrumentation-api-annotation-support"))
  16. testImplementation("net.bytebuddy:byte-buddy")
  17. }
  18. tasks {
  19. compileTestJava {
  20. options.compilerArgs.add("-parameters")
  21. }
  22. test {
  23. jvmArgs("-Dotel.instrumentation.opentelemetry-annotations.exclude-methods=io.opentelemetry.test.annotation.TracedWithSpan[ignored]")
  24. }
  25. }