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
+7 -4
View File
@@ -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 ->