Don't hardcode agent-for-testing archive filename so it can be publis… (#2146)
* Don't hardcode agent-for-testing archive filename so it can be published. * Fix accidental * afterEvaluate
This commit is contained in:
parent
23945d97e9
commit
49194ff444
|
@ -104,9 +104,11 @@ shadowJar {
|
|||
relocate "application.io.opentelemetry", "io.opentelemetry"
|
||||
}
|
||||
|
||||
evaluationDependsOn(":testing:agent-for-testing")
|
||||
|
||||
tasks.withType(Test).configureEach {
|
||||
jvmArgs "-Dotel.javaagent.debug=true"
|
||||
jvmArgs "-javaagent:${project(":testing:agent-for-testing").buildDir}/libs/javaagent-for-testing.jar"
|
||||
jvmArgs "-javaagent:${project(":testing:agent-for-testing").tasks.shadowJar.archiveFile.get().asFile.absolutePath}"
|
||||
jvmArgs "-Dotel.initializer.jar=${shadowJar.archiveFile.get().asFile.absolutePath}"
|
||||
jvmArgs "-Dinternal.testing.disable.global.library.ignores=true"
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ configurations {
|
|||
}
|
||||
|
||||
shadowJar {
|
||||
|
||||
mergeServiceFiles()
|
||||
|
||||
exclude '**/module-info.class'
|
||||
|
|
|
@ -36,9 +36,12 @@ configurations {
|
|||
shadowInclude
|
||||
}
|
||||
|
||||
evaluationDependsOn(":testing:agent-exporter")
|
||||
|
||||
shadowJar {
|
||||
configurations = [project.configurations.shadowInclude]
|
||||
archiveFileName = 'javaagent-for-testing.jar'
|
||||
|
||||
archiveClassifier.set("")
|
||||
|
||||
dependsOn ':testing:agent-exporter:shadowJar'
|
||||
with isolateSpec([project(':testing:agent-exporter').tasks.shadowJar])
|
||||
|
@ -77,9 +80,11 @@ dependencies {
|
|||
testImplementation deps.opentelemetryApi
|
||||
}
|
||||
|
||||
tasks.withType(Test).configureEach {
|
||||
afterEvaluate {
|
||||
tasks.withType(Test).configureEach {
|
||||
jvmArgs "-Dotel.javaagent.debug=true"
|
||||
jvmArgs "-javaagent:${shadowJar.archiveFile.get().asFile.absolutePath}"
|
||||
|
||||
dependsOn shadowJar
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue