Skip to content

Commit dc3a0dd

Browse files
committed
fix
1 parent c175d97 commit dc3a0dd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

javaagent/build.gradle.kts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ tasks {
151151
archiveFileName.set("baseJavaagentLibs-relocated-tmp.jar")
152152
}
153153

154-
val relocateBaseJavaagentLibs by registering(ShadowJar::class) {
154+
val relocateBaseJavaagentLibs by registering(Jar::class) {
155155
dependsOn(relocateBaseJavaagentLibsTmp)
156156

157157
copyByteBuddy(relocateBaseJavaagentLibsTmp.get().archiveFile)
@@ -171,7 +171,7 @@ tasks {
171171
archiveFileName.set("javaagentLibs-relocated-tmp.jar")
172172
}
173173

174-
val relocateJavaagentLibs by registering(ShadowJar::class) {
174+
val relocateJavaagentLibs by registering(Jar::class) {
175175
dependsOn(relocateJavaagentLibsTmp)
176176

177177
copyByteBuddy(relocateJavaagentLibsTmp.get().archiveFile)
@@ -389,7 +389,9 @@ fun CopySpec.copyByteBuddy(jar: Provider<RegularFile>) {
389389
// META-INF/versions/9/net/bytebuddy to net/bytebuddy to get rid of the duplicate classes.
390390
from(zipTree(jar)) {
391391
eachFile {
392-
if (path.startsWith("net/bytebuddy/")) {
392+
if (path.startsWith("net/bytebuddy/")
393+
// this is our class that we have placed in the byte buddy package, need to preserve it
394+
&& !path.startsWith("net/bytebuddy/agent/builder/AgentBuilderUtil")) {
393395
exclude()
394396
} else if (path.startsWith("META-INF/versions/9/net/bytebuddy/")) {
395397
path = path.removePrefix("META-INF/versions/9/")

0 commit comments

Comments
 (0)