[Build] Preserve original jar with unshaded postfix in subplugin example
Otherwise we have two tasks writing output to the same file. That behavior confuses Gradle.
This commit is contained in:
committed by
Space Team
parent
f6eae38d6c
commit
a2b688eb31
@@ -48,15 +48,18 @@ extensions.extraProperties["kotlin.stdlib.default.dependency"] = "false"
|
||||
//}
|
||||
|
||||
def sourceSet = sourceSets.main
|
||||
def jarTask = tasks.named(sourceSet.jarTaskName, Jar)
|
||||
def jarTask = tasks.named(sourceSet.jarTaskName, Jar) {
|
||||
archiveClassifier.set("unshaded")
|
||||
}
|
||||
def shadowJarTask = EmbeddableKt.embeddableCompilerDummyForDependenciesRewriting(
|
||||
project,
|
||||
"${EmbeddableKt.EMBEDDABLE_COMPILER_TASK_NAME}${sourceSet.jarTaskName.capitalize()}"
|
||||
) {
|
||||
def emptyClassifier = provider { "" }
|
||||
RepoArtifacts.setupPublicJar(
|
||||
it,
|
||||
jarTask.flatMap { it.archiveBaseName },
|
||||
jarTask.flatMap { it.archiveClassifier }
|
||||
jarTask.flatMap { emptyClassifier }
|
||||
)
|
||||
RepoArtifacts.addEmbeddedRuntime(it)
|
||||
it.from(sourceSet.output)
|
||||
|
||||
Reference in New Issue
Block a user