Move daemon jar from compiler
This commit is contained in:
@@ -15,12 +15,12 @@ val archives by configurations
|
||||
|
||||
dependencies {
|
||||
jarContents(project(":compiler:cli-common")) { isTransitive = false }
|
||||
jarContents(project(":compiler:daemon-common")) { isTransitive = false }
|
||||
jarContents(project(":compiler:daemon-common-new")) { isTransitive = false }
|
||||
jarContents(project(":daemon-common")) { isTransitive = false }
|
||||
jarContents(project(":daemon-common-new")) { isTransitive = false }
|
||||
jarContents(projectRuntimeJar(":kotlin-daemon-client"))
|
||||
testCompile(project(":compiler:cli-common"))
|
||||
testCompile(project(":compiler:daemon-common"))
|
||||
testCompile(project(":compiler:daemon-common-new"))
|
||||
testCompile(project(":daemon-common"))
|
||||
testCompile(project(":daemon-common-new"))
|
||||
testCompile(projectRuntimeJar(":kotlin-daemon-client"))
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompile(project(":kotlin-test:kotlin-test-jvm"))
|
||||
|
||||
@@ -9,6 +9,7 @@ dependencies {
|
||||
runtime(kotlinStdlib())
|
||||
runtime(project(":kotlin-script-runtime"))
|
||||
runtime(project(":kotlin-reflect"))
|
||||
runtime(project(":kotlin-daemon-embeddable"))
|
||||
runtime(commonDep("org.jetbrains.intellij.deps", "trove4j"))
|
||||
}
|
||||
|
||||
|
||||
@@ -26,14 +26,13 @@ val libraries by configurations.creating {
|
||||
extendsFrom(compile)
|
||||
}
|
||||
val trove4jJar by configurations.creating
|
||||
val ktorNetworkJar by configurations.creating
|
||||
|
||||
val default by configurations
|
||||
default.extendsFrom(runtimeJar)
|
||||
|
||||
val compilerBaseName = name
|
||||
|
||||
val ktorExcludesForDaemon : List<Pair<String, String>> by rootProject.extra
|
||||
|
||||
val outputJar = fileFrom(buildDir, "libs", "$compilerBaseName.jar")
|
||||
|
||||
val compilerModules: Array<String> by rootProject.extra
|
||||
@@ -58,11 +57,9 @@ dependencies {
|
||||
}
|
||||
|
||||
trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } }
|
||||
ktorNetworkJar(commonDep("io.ktor", "ktor-network"))
|
||||
|
||||
fatJarContents(kotlinBuiltins())
|
||||
fatJarContents(project(":kotlin-daemon-client-new")) {
|
||||
isTransitive = false
|
||||
}
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(commonDep("org.fusesource.jansi", "jansi"))
|
||||
@@ -70,11 +67,6 @@ dependencies {
|
||||
fatJarContents(commonDep("com.google.code.findbugs", "jsr305"))
|
||||
fatJarContents(commonDep("io.javaslang", "javaslang"))
|
||||
fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||
fatJarContents(commonDep("io.ktor", "ktor-network")) {
|
||||
ktorExcludesForDaemon.forEach { (group, module) ->
|
||||
exclude(group = group, module = module)
|
||||
}
|
||||
}
|
||||
|
||||
fatJarContents(intellijCoreDep()) { includeJars("intellij-core", "java-compatibility-1.0.1") }
|
||||
fatJarContents(intellijDep()) {
|
||||
@@ -142,6 +134,7 @@ val pack = if (shrink) proguard else packCompiler
|
||||
|
||||
dist(targetName = "$compilerBaseName.jar", fromTask = pack) {
|
||||
from(trove4jJar)
|
||||
from(ktorNetworkJar)
|
||||
}
|
||||
|
||||
runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) {
|
||||
|
||||
@@ -26,6 +26,7 @@ val libraries by configurations.creating {
|
||||
extendsFrom(compile)
|
||||
}
|
||||
val trove4jJar by configurations.creating
|
||||
val ktorNetworkJar by configurations.creating
|
||||
|
||||
val default by configurations
|
||||
default.extendsFrom(runtimeJar)
|
||||
@@ -36,8 +37,6 @@ val outputJar = fileFrom(buildDir, "libs", "$compilerBaseName.jar")
|
||||
|
||||
val compilerModules: Array<String> by rootProject.extra
|
||||
|
||||
val ktorExcludesForDaemon : List<Pair<String, String>> by rootProject.extra
|
||||
|
||||
dependencies {
|
||||
compile(kotlinStdlib())
|
||||
compile(project(":kotlin-script-runtime"))
|
||||
@@ -58,11 +57,9 @@ dependencies {
|
||||
}
|
||||
|
||||
trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } }
|
||||
ktorNetworkJar(commonDep("io.ktor", "ktor-network"))
|
||||
|
||||
fatJarContents(kotlinBuiltins())
|
||||
fatJarContents(project(":kotlin-daemon-client-new")) {
|
||||
isTransitive = false
|
||||
}
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(commonDep("org.fusesource.jansi", "jansi"))
|
||||
@@ -70,11 +67,6 @@ dependencies {
|
||||
fatJarContents(commonDep("com.google.code.findbugs", "jsr305"))
|
||||
fatJarContents(commonDep("io.javaslang", "javaslang"))
|
||||
fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||
fatJarContents(commonDep("io.ktor", "ktor-network")) {
|
||||
ktorExcludesForDaemon.forEach { (group, module) ->
|
||||
exclude(group = group, module = module)
|
||||
}
|
||||
}
|
||||
|
||||
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
fatJarContents(intellijDep()) {
|
||||
@@ -142,6 +134,7 @@ val pack = if (shrink) proguard else packCompiler
|
||||
|
||||
dist(targetName = "$compilerBaseName.jar", fromTask = pack) {
|
||||
from(trove4jJar)
|
||||
from(ktorNetworkJar)
|
||||
}
|
||||
|
||||
runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) {
|
||||
|
||||
@@ -26,6 +26,7 @@ val libraries by configurations.creating {
|
||||
extendsFrom(compile)
|
||||
}
|
||||
val trove4jJar by configurations.creating
|
||||
val ktorNetworkJar by configurations.creating
|
||||
|
||||
val default by configurations
|
||||
default.extendsFrom(runtimeJar)
|
||||
@@ -36,8 +37,6 @@ val outputJar = fileFrom(buildDir, "libs", "$compilerBaseName.jar")
|
||||
|
||||
val compilerModules: Array<String> by rootProject.extra
|
||||
|
||||
val ktorExcludesForDaemon : List<Pair<String, String>> by rootProject.extra
|
||||
|
||||
dependencies {
|
||||
compile(kotlinStdlib())
|
||||
compile(project(":kotlin-script-runtime"))
|
||||
@@ -58,11 +57,9 @@ dependencies {
|
||||
}
|
||||
|
||||
trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } }
|
||||
ktorNetworkJar(commonDep("io.ktor", "ktor-network"))
|
||||
|
||||
fatJarContents(kotlinBuiltins())
|
||||
fatJarContents(project(":kotlin-daemon-client-new")) {
|
||||
isTransitive = false
|
||||
}
|
||||
fatJarContents(commonDep("javax.inject"))
|
||||
fatJarContents(commonDep("org.jline", "jline"))
|
||||
fatJarContents(commonDep("org.fusesource.jansi", "jansi"))
|
||||
@@ -70,11 +67,6 @@ dependencies {
|
||||
fatJarContents(commonDep("com.google.code.findbugs", "jsr305"))
|
||||
fatJarContents(commonDep("io.javaslang", "javaslang"))
|
||||
fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||
fatJarContents(commonDep("io.ktor", "ktor-network")) {
|
||||
ktorExcludesForDaemon.forEach { (group, module) ->
|
||||
exclude(group = group, module = module)
|
||||
}
|
||||
}
|
||||
|
||||
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
fatJarContents(intellijDep()) {
|
||||
@@ -142,6 +134,7 @@ val pack = if (shrink) proguard else packCompiler
|
||||
|
||||
dist(targetName = "$compilerBaseName.jar", fromTask = pack) {
|
||||
from(trove4jJar)
|
||||
from(ktorNetworkJar)
|
||||
}
|
||||
|
||||
runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) {
|
||||
|
||||
@@ -21,8 +21,8 @@ val projectsToShadow by extra(listOf(
|
||||
":kotlin-build-common",
|
||||
":compiler:cli-common",
|
||||
":compiler:container",
|
||||
":compiler:daemon-common",
|
||||
":compiler:daemon-common-new",
|
||||
":daemon-common",
|
||||
":daemon-common-new",
|
||||
":core:metadata",
|
||||
":core:metadata.jvm",
|
||||
":core:descriptors",
|
||||
@@ -120,6 +120,10 @@ dependencies {
|
||||
libraries(project(":kotlin-reflect"))
|
||||
libraries(project(":kotlin-compiler-client-embeddable"))
|
||||
libraries(project(":kotlin-daemon-client"))
|
||||
libraries(project(":kotlin-daemon-client-new"))
|
||||
libraries(project(":kotlin-daemon")) {
|
||||
isTransitive = false
|
||||
}
|
||||
libraries(project(":kotlin-script-runtime"))
|
||||
libraries(project(":kotlin-script-util"))
|
||||
libraries(project(":kotlin-scripting-common"))
|
||||
|
||||
@@ -10,8 +10,8 @@ val projectsToShadow = listOf(
|
||||
":kotlin-build-common",
|
||||
":compiler:cli-common",
|
||||
":kotlin-compiler-runner",
|
||||
":compiler:daemon-common",
|
||||
":compiler:daemon-common-new",
|
||||
":daemon-common",
|
||||
":daemon-common-new",
|
||||
":core:descriptors",
|
||||
":core:descriptors.jvm",
|
||||
":idea:idea-jps-common",
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import org.gradle.jvm.tasks.Jar
|
||||
|
||||
description = "Kotlin Daemon (for using with embeddable compiler)"
|
||||
|
||||
plugins {
|
||||
`java`
|
||||
}
|
||||
|
||||
val packedJars by configurations.creating
|
||||
|
||||
dependencies {
|
||||
packedJars(project(":kotlin-daemon")) { isTransitive = false }
|
||||
}
|
||||
|
||||
publish()
|
||||
|
||||
noDefaultJar()
|
||||
|
||||
runtimeJar(rewriteDepsToShadedCompiler(
|
||||
task<ShadowJar>("shadowJar") {
|
||||
from(packedJars)
|
||||
}
|
||||
))
|
||||
|
||||
sourcesJar()
|
||||
javadocJar()
|
||||
Reference in New Issue
Block a user