Make a project-wide embeddedComponents configuration for embedding external binaries to project artifacts
This commit is contained in:
@@ -13,16 +13,19 @@ sourceSets {
|
||||
"test" {}
|
||||
}
|
||||
|
||||
// Do not rename, used in JPS importer
|
||||
val fatJarContents by configurations.creating
|
||||
containsEmbeddedComponents()
|
||||
|
||||
dependencies {
|
||||
projectsToShadow.forEach {p ->
|
||||
fatJarContents(project(p)) { isTransitive = false }
|
||||
projectsToShadow.forEach { p ->
|
||||
embeddedComponents(project(p)) { isTransitive = false }
|
||||
}
|
||||
}
|
||||
|
||||
runtimeJar {
|
||||
/*
|
||||
TODO: `fromEmbeddedComponents()` should be used here.
|
||||
Couldn't use it because of the "must be locked before it can be used to compute a classpath" error.
|
||||
*/
|
||||
projectsToShadow.forEach {
|
||||
dependsOn("$it:classes")
|
||||
project(it).let { p ->
|
||||
|
||||
@@ -23,7 +23,6 @@ val shrink =
|
||||
val compilerManifestClassPath =
|
||||
"kotlin-stdlib.jar kotlin-reflect.jar kotlin-script-runtime.jar"
|
||||
|
||||
// Do not rename, used in JPS importer
|
||||
val fatJarContents by configurations.creating
|
||||
|
||||
val fatJarContentsStripMetadata by configurations.creating
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user