Build: Improve sourcesJar helper

- Add sources from embedded projects
 - Add artifact to sources configuration
 - Use register instead of create

 #KT-30237 Fixed
This commit is contained in:
Vyacheslav Gerasimov
2019-06-02 00:28:21 +03:00
parent 547b10ee29
commit 2769dc8359
2 changed files with 37 additions and 16 deletions
+6 -1
View File
@@ -177,12 +177,17 @@ val relocateCoreSources by task<Copy> {
tasks.getByName("jar").enabled = false
val sourcesJar = sourcesJar(sourceSet = null) {
val sourcesJar = tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
dependsOn(relocateCoreSources)
from(relocatedCoreSrc)
from("$core/reflection.jvm/src")
}
addArtifact("archives", sourcesJar)
addArtifact("sources", sourcesJar)
val result by task<Jar> {
dependsOn(proguard)
from(zipTree(file(proguardOutput)))