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
@@ -6,8 +6,7 @@ apply { plugin("jps-compatible") }
val robolectricClasspath by configurations.creating
// Do not rename, used in JPS importer
val fatJarContents by configurations.creating
containsEmbeddedComponents()
dependencies {
testCompile(intellijCoreDep()) { includeJars("intellij-core") }
@@ -34,7 +33,7 @@ dependencies {
robolectricClasspath(commonDep("org.robolectric", "robolectric"))
fatJarContents(project(":kotlin-android-extensions-runtime"))
embeddedComponents(project(":kotlin-android-extensions-runtime")) { isTransitive = false }
}
sourceSets {
@@ -43,7 +42,7 @@ sourceSets {
}
runtimeJar {
from(getSourceSetsFrom(":kotlin-android-extensions-runtime")["main"].output.classesDirs)
fromEmbeddedComponents()
}
dist()
@@ -4,6 +4,8 @@ description = "Annotation Processor for Kotlin"
apply { plugin("kotlin") }
apply { plugin("jps-compatible") }
containsEmbeddedComponents()
dependencies {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testRuntime(intellijDep())
@@ -23,6 +25,8 @@ dependencies {
testCompile(projectTests(":compiler:tests-common"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-annotation-processing-runtime"))
embeddedComponents(project(":kotlin-annotation-processing-runtime")) { isTransitive = false }
}
sourceSets {
@@ -30,10 +34,6 @@ sourceSets {
"test" { projectDefault() }
}
runtimeJar {
from(getSourceSetsFrom(":kotlin-annotation-processing-runtime")["main"].output.classesDirs)
}
testsJar {}
projectTest {
@@ -41,7 +41,10 @@ projectTest {
dependsOn(":dist")
}
runtimeJar()
runtimeJar {
fromEmbeddedComponents()
}
sourcesJar()
javadocJar()