Skip to content

Commit 75634fe

Browse files
authored
byte-buddy now ships classes optimized for Java8+ under META-INF/versions/9 (#8735)
since we target Java8+ we can promote these classes over the pre-Java8 ones
1 parent de593cc commit 75634fe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dd-java-agent/build.gradle

+10
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ def includeShadowJar(TaskProvider<ShadowJar> shadowJarTask, String jarname) {
9999
rename '(^.*)\\.class$', '$1.classdata'
100100
// Rename LICENSE file since it clashes with license dir on non-case sensitive FSs (i.e. Mac)
101101
rename '^LICENSE$', 'LICENSE.renamed'
102+
if (jarname == 'inst') {
103+
// byte-buddy now ships classes optimized for Java8+ under META-INF/versions/9
104+
// since we target Java8+ we can promote these classes over the pre-Java8 ones
105+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
106+
eachFile {
107+
if (it.path.contains('META-INF/versions/9/net/bytebuddy')) {
108+
it.path = it.path.replace('META-INF/versions/9/', '')
109+
}
110+
}
111+
}
102112
}
103113
}
104114

0 commit comments

Comments
 (0)