Skip to content

Commit 1f8e84a

Browse files
committed
fix
1 parent 7a69707 commit 1f8e84a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

javaagent/build.gradle.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ tasks {
149149
val buildBootstrapLibs by registering(ShadowJar::class) {
150150
configurations = listOf(bootstrapLibs)
151151

152-
// exclude the agent part of the javaagent-extension-api; these classes will be added in relocate tasks
153-
exclude("io/opentelemetry/javaagent/extension/**")
152+
excludeNonBootstrapClasses()
154153

155154
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
156155

@@ -426,6 +425,13 @@ fun CopySpec.copyByteBuddy(jar: Provider<RegularFile>) {
426425
}
427426
}
428427

428+
// exclude bootstrap projects from javaagent libs - they won't be added to inst/
429+
fun ShadowJar.excludeNonBootstrapClasses() {
430+
// exclude the agent part of the javaagent-extension-api; these classes will be added in relocate tasks
431+
exclude("io/opentelemetry/javaagent/extension/**")
432+
exclude("**/instrumentation/api/incubator/sdk/**")
433+
}
434+
429435
// exclude bootstrap projects from javaagent libs - they won't be added to inst/
430436
fun ShadowJar.excludeBootstrapClasses() {
431437
dependencies {

0 commit comments

Comments
 (0)