Use rewriteDeps task on the projects with runtime dependency on embeddable compiler...

which are using shaded dependencies
This commit is contained in:
Ilya Chernikov
2017-10-12 14:07:18 +02:00
parent fb70227868
commit 050403d15b
7 changed files with 24 additions and 96 deletions
@@ -2,16 +2,6 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
description = "Annotation Processor wrapper for Kotlin"
buildscript {
repositories {
jcenter()
}
dependencies {
classpath("com.github.jengelman.gradle.plugins:shadow:${property("versions.shadow")}")
}
}
apply { plugin("kotlin") }
val packedJars by configurations.creating
@@ -25,16 +15,19 @@ dependencies {
testCompile("com.android.tools.build:gradle:1.1.0")
testCompile(commonDep("junit:junit"))
packedJars(project(":kotlin-annotation-processing")) { isTransitive = false }
runtime(projectRuntimeJar(":kotlin-compiler-embeddable"))
}
projectTest {
workingDir = projectDir
}
runtimeJar(task<ShadowJar>("shadowJar")) {
val originalJar by task<ShadowJar> {
from(packedJars)
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
}
runtimeJar(rewriteDepsToShadedCompiler(originalJar))
sourcesJar()
javadocJar()