12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- plugins {
- id("com.github.johnrengelman.shadow")
- id("otel.java-conventions")
- }
- sourceSets {
- main {
- val caffeine2ShadedDeps = project(":instrumentation-api-caching:caffeine2")
- output.dir(caffeine2ShadedDeps.file("build/extracted/shadow"), "builtBy" to ":instrumentation-api-caching:caffeine2:extractShadowJar")
- val caffeine3ShadedDeps = project(":instrumentation-api-caching:caffeine3")
- output.dir(caffeine3ShadedDeps.file("build/extracted/shadow"), "builtBy" to ":instrumentation-api-caching:caffeine3:extractShadowJar")
- }
- }
- val shadowInclude by configurations.creating {
- isCanBeResolved = true
- isCanBeConsumed = false
- }
- dependencies {
- implementation("com.google.code.findbugs:jsr305:3.0.2")
- compileOnly(project(":instrumentation-api-caching:caffeine2", configuration = "shadow"))
- compileOnly(project(":instrumentation-api-caching:caffeine3", configuration = "shadow"))
- compileOnly("com.blogspot.mydailyjava:weak-lock-free")
- shadowInclude("com.blogspot.mydailyjava:weak-lock-free")
- }
- tasks {
- shadowJar {
- configurations = listOf(shadowInclude)
- relocate("com.blogspot.mydailyjava.weaklockfree", "io.opentelemetry.instrumentation.api.internal.shaded.weaklockfree")
- }
- val extractShadowJar by registering(Copy::class) {
- dependsOn(shadowJar)
- from(zipTree(shadowJar.get().archiveFile)) {
- exclude("META-INF/**")
- }
- into("build/extracted/shadow")
- }
- }
|