build.gradle.kts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. plugins {
  2. id("com.github.johnrengelman.shadow")
  3. id("otel.java-conventions")
  4. }
  5. group = "io.opentelemetry.javaagent.instrumentation"
  6. dependencies {
  7. implementation(project(":instrumentation:r2dbc-1.0:library"))
  8. }
  9. tasks {
  10. shadowJar {
  11. exclude {
  12. it.path.startsWith("META-INF") && !it.path.startsWith("META-INF/io/opentelemetry/instrumentation/")
  13. }
  14. dependencies {
  15. // including only :r2dbc-1.0:library excludes its transitive dependencies
  16. include(project(":instrumentation:r2dbc-1.0:library"))
  17. include(dependency("io.r2dbc:r2dbc-proxy"))
  18. }
  19. relocate(
  20. "io.r2dbc.proxy",
  21. "io.opentelemetry.instrumentation.r2dbc.v1_0.shaded.io.r2dbc.proxy"
  22. )
  23. }
  24. val extractShadowJar by registering(Copy::class) {
  25. dependsOn(shadowJar)
  26. from(zipTree(shadowJar.get().archiveFile))
  27. exclude("META-INF/**")
  28. into("build/extracted/shadow")
  29. }
  30. val extractShadowJarSpring by registering(Copy::class) {
  31. dependsOn(shadowJar)
  32. from(zipTree(shadowJar.get().archiveFile))
  33. into("build/extracted/shadow-spring")
  34. }
  35. }