build.gradle.kts 935 B

123456789101112131415161718192021222324252627282930313233343536
  1. import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
  2. plugins {
  3. id("otel.java-conventions")
  4. id("otel.publish-conventions")
  5. id("com.github.johnrengelman.shadow")
  6. }
  7. group = "io.opentelemetry.javaagent"
  8. dependencies {
  9. compileOnly(project(":javaagent-bootstrap"))
  10. compileOnly(project(":javaagent-tooling"))
  11. implementation("org.slf4j:slf4j-api")
  12. implementation("org.slf4j:slf4j-simple")
  13. annotationProcessor("com.google.auto.service:auto-service")
  14. compileOnly("com.google.auto.service:auto-service-annotations")
  15. testCompileOnly("com.google.auto.service:auto-service-annotations")
  16. }
  17. tasks {
  18. val shadowJar by existing(ShadowJar::class) {
  19. // required for META-INF/services files relocation
  20. mergeServiceFiles()
  21. // Prevents configuration naming conflict with other SLF4J instances
  22. relocate("org.slf4j", "io.opentelemetry.javaagent.slf4j")
  23. }
  24. assemble {
  25. dependsOn(shadowJar)
  26. }
  27. }