Build: Use stripMetadata task for result jar when relocation is enabled
to cleanup invalid metadata left after relocation
This commit is contained in:
@@ -189,8 +189,14 @@ addArtifact("archives", sourcesJar)
|
|||||||
addArtifact("sources", sourcesJar)
|
addArtifact("sources", sourcesJar)
|
||||||
|
|
||||||
val result by task<Jar> {
|
val result by task<Jar> {
|
||||||
val task = if (kotlinBuildProperties.proguard) proguard else reflectShadowJar
|
val task = when {
|
||||||
|
kotlinBuildProperties.proguard -> proguard
|
||||||
|
kotlinBuildProperties.relocation -> stripMetadata
|
||||||
|
else -> reflectShadowJar
|
||||||
|
}
|
||||||
|
|
||||||
dependsOn(task)
|
dependsOn(task)
|
||||||
|
|
||||||
from {
|
from {
|
||||||
zipTree(task.outputs.files.singleFile)
|
zipTree(task.outputs.files.singleFile)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user