Publish armeria-shaded-for-testing without -all classifier (#3475)
* Publish armeria-shaded-for-testing without -all classifier * Update testing-common/build.gradle.kts Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com> * compileOnly Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
This commit is contained in:
parent
b9fcb6b498
commit
f78d414975
|
@ -6,6 +6,13 @@ plugins {
|
|||
description = "OpenTelemetry Javaagent testing commons"
|
||||
group = "io.opentelemetry.javaagent"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
val armeriaShadedDeps = project(":testing:armeria-shaded-for-testing")
|
||||
output.dir(armeriaShadedDeps .file("build/extracted/shadow"), "builtBy" to ":testing:armeria-shaded-for-testing:extractShadowJar")
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api("org.codehaus.groovy:groovy-all")
|
||||
api("org.spockframework:spock-core")
|
||||
|
@ -17,7 +24,7 @@ dependencies {
|
|||
api("io.opentelemetry:opentelemetry-sdk-metrics")
|
||||
api("io.opentelemetry:opentelemetry-sdk-testing")
|
||||
|
||||
api(project(path = ":testing:armeria-shaded-for-testing", configuration = "shadow"))
|
||||
compileOnly(project(path = ":testing:armeria-shaded-for-testing", configuration = "shadow"))
|
||||
|
||||
implementation("io.opentelemetry:opentelemetry-proto") {
|
||||
// Only need the proto, not gRPC.
|
||||
|
|
|
@ -2,11 +2,8 @@ plugins {
|
|||
id("com.github.johnrengelman.shadow")
|
||||
|
||||
id("otel.java-conventions")
|
||||
id("otel.publish-conventions")
|
||||
}
|
||||
|
||||
group = "io.opentelemetry.javaagent"
|
||||
|
||||
dependencies {
|
||||
implementation("com.linecorp.armeria:armeria-junit5:1.8.0") {
|
||||
// We don't use JSON features of Armeria but shading it in can cause version conflicts with
|
||||
|
@ -28,4 +25,15 @@ tasks {
|
|||
relocate("META-INF/native/netty", "META-INF/native/io_opentelemetry_testing_internal_netty")
|
||||
mergeServiceFiles()
|
||||
}
|
||||
}
|
||||
|
||||
val extractShadowJar by registering(Copy::class) {
|
||||
dependsOn(shadowJar)
|
||||
// there's both "LICENSE" file and "license" and without excluding one of these build fails on case insensitive file systems
|
||||
// there's a LICENSE.txt file that has the same contents anyway, so we're not losing anything excluding that
|
||||
from(zipTree(shadowJar.get().archiveFile)) {
|
||||
exclude("META-INF/LICENSE")
|
||||
}
|
||||
into("build/extracted/shadow")
|
||||
includeEmptyDirs = false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue