Use rewriteDeps task on the projects with runtime dependency on embeddable compiler...
which are using shaded dependencies
This commit is contained in:
@@ -19,28 +19,16 @@ dependencies {
|
||||
compileOnly 'org.jetbrains.kotlin:gradle-api:1.6'
|
||||
}
|
||||
|
||||
def originalSrc = "$kotlin_root/plugins/allopen/allopen-cli/src"
|
||||
//def targetSrc = file("$buildDir/allopen-target-src")
|
||||
//
|
||||
//task preprocessSources(type: Copy) {
|
||||
// from originalSrc
|
||||
// into targetSrc
|
||||
// filter { it.replaceAll('(?<!\\.)com\\.intellij', 'org.jetbrains.kotlin.com.intellij') }
|
||||
//}
|
||||
|
||||
//sourceSets.main.java.srcDirs += originalSrc
|
||||
|
||||
//compileKotlin.dependsOn preprocessSources
|
||||
|
||||
evaluationDependsOn(":kotlin-allopen-compiler-plugin")
|
||||
|
||||
jar {
|
||||
// from(originalSrc) { include("META-INF/**") }
|
||||
from(project(":kotlin-allopen-compiler-plugin").sourceSets.main.output.classesDirs)
|
||||
from(project(":kotlin-allopen-compiler-plugin").sourceSets.main.output.resourcesDir)
|
||||
manifestAttributes(manifest, project)
|
||||
}
|
||||
|
||||
ArtifactsKt.runtimeJar(project, EmbeddableKt.rewriteDepsToShadedCompiler(project, jar, {}), {})
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -93,6 +93,8 @@ jar {
|
||||
manifestAttributes(manifest, project)
|
||||
}
|
||||
|
||||
ArtifactsKt.runtimeJar(project, EmbeddableKt.rewriteDepsToShadedCompiler(project, jar, {}), {})
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
|
||||
@@ -25,28 +25,16 @@ dependencies {
|
||||
compileOnly 'org.jetbrains.kotlin:gradle-api:1.6'
|
||||
}
|
||||
|
||||
def originalSrc = "$kotlin_root/plugins/noarg/noarg-cli/src"
|
||||
//def targetSrc = file("$buildDir/noarg-target-src")
|
||||
//
|
||||
//task preprocessSources(type: Copy) {
|
||||
// from originalSrc
|
||||
// into targetSrc
|
||||
// filter { it.replaceAll('(?<!\\.)com\\.intellij', 'org.jetbrains.kotlin.com.intellij') }
|
||||
//}
|
||||
|
||||
//sourceSets.main.java.srcDirs += originalSrc
|
||||
|
||||
//compileKotlin.dependsOn preprocessSources
|
||||
|
||||
evaluationDependsOn(":kotlin-noarg-compiler-plugin")
|
||||
|
||||
jar {
|
||||
// from(originalSrc) { include("META-INF/**") }
|
||||
from(project(":kotlin-noarg-compiler-plugin").sourceSets.main.output.classesDirs)
|
||||
from(project(":kotlin-noarg-compiler-plugin").sourceSets.main.output.resourcesDir)
|
||||
manifestAttributes(manifest, project)
|
||||
}
|
||||
|
||||
ArtifactsKt.runtimeJar(project, EmbeddableKt.rewriteDepsToShadedCompiler(project, jar, {}), {})
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
|
||||
@@ -25,28 +25,16 @@ dependencies {
|
||||
compileOnly 'org.jetbrains.kotlin:gradle-api:1.6'
|
||||
}
|
||||
|
||||
def originalSrc = "$kotlin_root/plugins/sam-with-receiver/sam-with-receiver-cli/src"
|
||||
//def targetSrc = file("$buildDir/sam-with-receiver-target-src")
|
||||
//
|
||||
//task preprocessSources(type: Copy) {
|
||||
// from originalSrc
|
||||
// into targetSrc
|
||||
// filter { it.replaceAll('(?<!\\.)com\\.intellij', 'org.jetbrains.kotlin.com.intellij') }
|
||||
//}
|
||||
|
||||
//sourceSets.main.java.srcDirs += originalSrc
|
||||
|
||||
//compileKotlin.dependsOn preprocessSources
|
||||
|
||||
evaluationDependsOn(":kotlin-sam-with-receiver-compiler-plugin")
|
||||
|
||||
jar {
|
||||
// from(originalSrc) { include("META-INF/**") }
|
||||
from(project(":kotlin-sam-with-receiver-compiler-plugin").sourceSets.main.output.classesDirs)
|
||||
from(project(":kotlin-sam-with-receiver-compiler-plugin").sourceSets.main.output.resourcesDir)
|
||||
manifestAttributes(manifest, project)
|
||||
}
|
||||
|
||||
ArtifactsKt.runtimeJar(project, EmbeddableKt.rewriteDepsToShadedCompiler(project, jar, {}), {})
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
|
||||
Reference in New Issue
Block a user