Exclude module-info descriptor from standard library artifacts

There's a conflict between kotlin-stdlib and kotlin-reflect, and
that descriptor is anyway not needed when running merged jar
on a classpath.

(cherry picked from commit 2b0f99aea8b3cbb6669ecc63017bee7c379c8b9c)
This commit is contained in:
Ilya Gorbunov
2020-05-14 09:53:03 +03:00
committed by Vasily Levchenko
parent 3296981213
commit 2629c44a34
2 changed files with 2 additions and 0 deletions
@@ -43,6 +43,7 @@ open class CollisionDetector : DefaultTask() {
zip.entries().asSequence().filterNot {
it.isDirectory ||
it.name.equals("META-INF/MANIFEST.MF", ignoreCase = true) ||
it.name.equals("META-INF/versions/9/module-info.class", ignoreCase = true) ||
it.name.startsWith("META-INF/services/", ignoreCase = true)
}.forEach {
val outputPath = it.name
+1
View File
@@ -332,6 +332,7 @@ task shadowJar(type: ShadowJar) {
archiveBaseName.set("kotlin-native")
// Exclude trove4j because of license agreement.
exclude "*trove4j*"
exclude("META-INF/versions/9/module-info.class")
configurations = [project.configurations.distPack]
archiveClassifier.set(null)
transform(CollisionTransformer.class) {