Make a project-wide embeddedComponents configuration for embedding external binaries to project artifacts

This commit is contained in:
Yan Zhulanow
2018-02-22 21:45:00 +03:00
parent 3c06dd7464
commit 6e65a4810e
9 changed files with 116 additions and 37 deletions
+4 -4
View File
@@ -21,20 +21,20 @@ val projectsToShadow = listOf(
":core:util.runtime",
":plugins:android-extensions-jps")
// Do not rename, used in JPS importer
val fatJarContents by configurations.creating
containsEmbeddedComponents()
dependencies {
projectsToShadow.forEach {
fatJarContents(project(it)) { isTransitive = false }
embeddedComponents(project(it)) { isTransitive = false }
}
}
runtimeJar<ShadowJar>(task<ShadowJar>("jar")) {
manifest.attributes.put("Main-Class", "org.jetbrains.kotlin.runner.Main")
manifest.attributes.put("Class-Path", "kotlin-stdlib.jar")
from(fatJarContents)
from(files("$rootDir/resources/kotlinManifest.properties"))
fromEmbeddedComponents()
}
ideaPlugin("lib/jps")