build.gradle.kts 1006 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. val agentSlf4jVersion = "2.0.0"
  9. dependencies {
  10. compileOnly(project(":javaagent-bootstrap"))
  11. compileOnly(project(":javaagent-tooling"))
  12. implementation("org.slf4j:slf4j-api:$agentSlf4jVersion")
  13. implementation("org.slf4j:slf4j-simple:$agentSlf4jVersion")
  14. annotationProcessor("com.google.auto.service:auto-service")
  15. compileOnly("com.google.auto.service:auto-service-annotations")
  16. testCompileOnly("com.google.auto.service:auto-service-annotations")
  17. }
  18. tasks {
  19. val shadowJar by existing(ShadowJar::class) {
  20. // required for META-INF/services files relocation
  21. mergeServiceFiles()
  22. // Prevents configuration naming conflict with other SLF4J instances
  23. relocate("org.slf4j", "io.opentelemetry.javaagent.slf4j")
  24. }
  25. assemble {
  26. dependsOn(shadowJar)
  27. }
  28. }