|
@@ -1,14 +1,9 @@
|
|
-import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
-
|
|
|
|
plugins {
|
|
plugins {
|
|
id("com.github.johnrengelman.shadow")
|
|
id("com.github.johnrengelman.shadow")
|
|
|
|
|
|
id("otel.java-conventions")
|
|
id("otel.java-conventions")
|
|
- id("otel.publish-conventions")
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-group = "io.opentelemetry.instrumentation"
|
|
|
|
-
|
|
|
|
val shadowInclude by configurations.creating {
|
|
val shadowInclude by configurations.creating {
|
|
isCanBeResolved = true
|
|
isCanBeResolved = true
|
|
isCanBeConsumed = false
|
|
isCanBeConsumed = false
|
|
@@ -26,29 +21,20 @@ dependencies {
|
|
}
|
|
}
|
|
|
|
|
|
tasks {
|
|
tasks {
|
|
- named<ShadowJar>("shadowJar") {
|
|
|
|
|
|
+ shadowJar {
|
|
configurations = listOf(shadowInclude)
|
|
configurations = listOf(shadowInclude)
|
|
|
|
|
|
- archiveClassifier.set("")
|
|
|
|
-
|
|
|
|
relocate("com.github.benmanes.caffeine", "io.opentelemetry.instrumentation.api.internal.shaded.caffeine")
|
|
relocate("com.github.benmanes.caffeine", "io.opentelemetry.instrumentation.api.internal.shaded.caffeine")
|
|
relocate("com.blogspot.mydailyjava.weaklockfree", "io.opentelemetry.instrumentation.api.internal.shaded.weaklockfree")
|
|
relocate("com.blogspot.mydailyjava.weaklockfree", "io.opentelemetry.instrumentation.api.internal.shaded.weaklockfree")
|
|
|
|
|
|
minimize()
|
|
minimize()
|
|
}
|
|
}
|
|
|
|
|
|
- named("jar") {
|
|
|
|
- enabled = false
|
|
|
|
-
|
|
|
|
|
|
+ val extractShadowJar by registering(Copy::class) {
|
|
dependsOn(shadowJar)
|
|
dependsOn(shadowJar)
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// Because shadow does not use default configurations
|
|
|
|
-publishing {
|
|
|
|
- publications {
|
|
|
|
- named<MavenPublication>("maven") {
|
|
|
|
- project.shadow.component(this)
|
|
|
|
- }
|
|
|
|
|
|
+ from(zipTree(shadowJar.get().archiveFile))
|
|
|
|
+ into("build/extracted/shadow")
|
|
|
|
+ // prevents empty com/github/benmanes/caffeine/cache path from ending up in instrumentation-api
|
|
|
|
+ includeEmptyDirs = false
|
|
}
|
|
}
|
|
}
|
|
}
|