@@ -160,6 +160,15 @@ tasks {
160160
161161 excludeBootstrapClasses()
162162
163+ duplicatesStrategy = DuplicatesStrategy .FAIL
164+ // TODO: remove after updating contrib to 1.50.0
165+ filesMatching(" io/opentelemetry/contrib/gcp/resource/version.properties" ) {
166+ duplicatesStrategy = DuplicatesStrategy .EXCLUDE
167+ }
168+ exclude(" META-INF/LICENSE" )
169+ exclude(" META-INF/NOTICE" )
170+ exclude(" META-INF/maven/**" )
171+
163172 archiveFileName.set(" baseJavaagentLibs-relocated-tmp.jar" )
164173 }
165174
@@ -180,6 +189,18 @@ tasks {
180189 // remove MPL licensed content
181190 exclude(" okhttp3/internal/publicsuffix/PublicSuffixDatabase.list" )
182191
192+ duplicatesStrategy = DuplicatesStrategy .FAIL
193+ // TODO: remove after updating contrib to 1.50.0
194+ filesMatching(" io/opentelemetry/contrib/gcp/resource/version.properties" ) {
195+ duplicatesStrategy = DuplicatesStrategy .EXCLUDE
196+ }
197+ filesMatching(" META-INF/io/opentelemetry/instrumentation/**" ) {
198+ duplicatesStrategy = DuplicatesStrategy .EXCLUDE
199+ }
200+ exclude(" META-INF/LICENSE" )
201+ exclude(" META-INF/NOTICE" )
202+ exclude(" META-INF/maven/**" )
203+
183204 archiveFileName.set(" javaagentLibs-relocated-tmp.jar" )
184205 }
185206
@@ -391,8 +412,8 @@ fun CopySpec.isolateClasses(jar: Provider<RegularFile>) {
391412 // important to keep prefix "inst" short, as it is prefixed to lots of strings in runtime mem
392413 into(" inst" )
393414 rename(" (^.*)\\ .class\$ " , " \$ 1.classdata" )
394- // Rename LICENSE file since it clashes with license dir on non-case sensitive FSs (i.e. Mac )
395- rename( """ ^ LICENSE$ """ , " LICENSE.renamed " )
415+ exclude( """ ^LICENSE$ """ )
416+ exclude( " META-INF/ LICENSE.txt " )
396417 exclude(" META-INF/INDEX.LIST" )
397418 exclude(" META-INF/*.DSA" )
398419 exclude(" META-INF/*.SF" )
0 commit comments