Fix dependencies rewriting and gradle integration tests after applying rewriting

This commit is contained in:
Ilya Chernikov
2017-10-14 10:22:02 +02:00
parent 050403d15b
commit 431d47a605
5 changed files with 106 additions and 23 deletions
@@ -1,4 +1,6 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact
import org.gradle.jvm.tasks.Jar
description = "Annotation Processor wrapper for Kotlin"
@@ -22,12 +24,20 @@ projectTest {
workingDir = projectDir
}
val originalJar by task<ShadowJar> {
from(packedJars)
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
}
runtimeJar(rewriteDepsToShadedCompiler(originalJar))
//noDefaultJar()
//tasks.remove(tasks.findByName("jar"))
//
//runtimeJar(task<ShadowJar>("jar")) {
// from(packedJars)
// from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
// configureRelocation()
//}
runtimeJar(rewriteDepsToShadedCompiler(
task<ShadowJar>("shadowJar") {
from(packedJars)
from(the<JavaPluginConvention>().sourceSets.getByName("main").output)
}
))
sourcesJar()
javadocJar()
@@ -24,6 +24,8 @@ dependencies {
testCompile project(path: ':compiler:incremental-compilation-impl', configuration: 'tests-jar')
testCompile 'org.jetbrains.kotlin:gradle-api:2.2'
testRuntime project(path: ':kotlin-android-extensions', configuration: 'runtimeJar')
}
test.dependsOn(":kotlin-allopen:install",
@@ -32,9 +32,9 @@ dependencies {
compileOnly project(':compiler:incremental-compilation-impl')
compile project(':kotlin-stdlib')
compile project(':kotlin-android-extensions')
compile project(':kotlin-build-common')
compile project(':kotlin-compiler-runner')
compileOnly project(':kotlin-android-extensions')
compileOnly project(':kotlin-build-common')
compileOnly project(':kotlin-compiler-runner')
compileOnly project(':kotlin-annotation-processing')
compileOnly project(':kotlin-annotation-processing-gradle')
@@ -44,6 +44,8 @@ dependencies {
runtime project(path: ':kotlin-compiler-embeddable', configuration: "runtimeJar")
runtime project(path: ':kotlin-annotation-processing-gradle', configuration: "runtimeJar")
runtime project(path: ':kotlin-android-extensions', configuration: 'runtimeJar')
runtime project(path: ':kotlin-compiler-runner', configuration: 'runtimeJar')
agp25CompileOnly 'com.android.tools.build:gradle:3.0.0-alpha1'
agp25CompileOnly 'org.codehaus.groovy:groovy-all:2.3.9'
@@ -53,6 +55,8 @@ dependencies {
testCompileOnly project(':compiler')
testCompile project (path: ':kotlin-build-common', configuration: 'tests-jar')
testCompile project(':kotlin-android-extensions')
testCompile project(':kotlin-compiler-runner')
testCompile project(':kotlin-test::kotlin-test-junit')
testCompile "junit:junit:4.12"
testCompileOnly project(':kotlin-annotation-processing')