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
@@ -9,8 +9,7 @@ jvmTarget = "1.6"
val nativePlatformVariants: List<String> by rootProject.extra
// Do not rename, used in JPS importer
val fatJarContents by configurations.creating
containsEmbeddedComponents()
dependencies {
compileOnly(project(":compiler:util"))
@@ -18,10 +17,11 @@ dependencies {
compileOnly(project(":compiler:daemon-common"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(commonDep("net.rubygrapefruit", "native-platform"))
fatJarContents(project(":compiler:daemon-common")) { isTransitive = false }
fatJarContents(commonDep("net.rubygrapefruit", "native-platform"))
embeddedComponents(project(":compiler:daemon-common")) { isTransitive = false }
embeddedComponents(commonDep("net.rubygrapefruit", "native-platform"))
nativePlatformVariants.forEach {
fatJarContents(commonDep("net.rubygrapefruit", "native-platform", "-$it"))
embeddedComponents(commonDep("net.rubygrapefruit", "native-platform", "-$it"))
}
}
@@ -32,8 +32,9 @@ sourceSets {
runtimeJar(task<ShadowJar>("shadowJar")) {
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
from(fatJarContents)
fromEmbeddedComponents()
}
sourcesJar()
javadocJar()