Reorganize dependencies around kotlin-compiler.jar

#KT-26807 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-12-12 11:51:25 +03:00
parent 30c769c19a
commit d5ebe2e66a
18 changed files with 98 additions and 31 deletions
+12 -7
View File
@@ -17,8 +17,6 @@ val shrink =
findProperty("kotlin.build.proguard")?.toString()?.toBoolean()
?: hasProperty("teamcity")
val compilerManifestClassPath = "kotlin-stdlib.jar kotlin-reflect.jar kotlin-script-runtime.jar"
val fatJarContents by configurations.creating
val fatJarContentsStripMetadata by configurations.creating
@@ -31,6 +29,7 @@ val compile by configurations // maven plugin writes pom compile scope from com
val libraries by configurations.creating {
extendsFrom(compile)
}
val trove4jJar by configurations.creating
val default by configurations
default.extendsFrom(runtimeJar)
@@ -51,6 +50,7 @@ dependencies {
compile(project(":kotlin-stdlib"))
compile(project(":kotlin-script-runtime"))
compile(project(":kotlin-reflect"))
compile(commonDep("org.jetbrains.intellij.deps", "trove4j"))
libraries(project(":kotlin-annotations-jvm"))
libraries(
@@ -69,6 +69,8 @@ dependencies {
fatSourcesJarContents(it)
}
trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } }
fatJarContents(project(":core:builtins", configuration = "builtins"))
fatJarContents(commonDep("javax.inject"))
fatJarContents(commonDep("org.jline", "jline"))
@@ -79,7 +81,11 @@ dependencies {
fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
fatJarContents(intellijCoreDep()) { includeJars("intellij-core", "java-compatibility-1.0.1") }
fatJarContents(intellijDep()) { includeIntellijCoreJarDependencies(project, { !(it.startsWith("jdom") || it.startsWith("log4j")) }) }
fatJarContents(intellijDep()) {
includeIntellijCoreJarDependencies(project) {
!(it.startsWith("jdom") || it.startsWith("log4j") || it.startsWith("trove4j"))
}
}
fatJarContents(intellijDep()) { includeJars("jna-platform", "lz4-1.3.0") }
fatJarContentsStripServices(intellijDep("jps-standalone")) { includeJars("jps-model") }
fatJarContentsStripMetadata(intellijDep()) { includeJars("oro-2.0.8", "jdom", "log4j" ) }
@@ -136,10 +142,9 @@ val proguard by task<ProGuardTask> {
val pack = if (shrink) proguard else packCompiler
dist(
targetName = "$compilerBaseName.jar",
fromTask = pack
)
dist(targetName = "$compilerBaseName.jar", fromTask = pack) {
from(trove4jJar)
}
runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) {
name = compilerBaseName
+12 -7
View File
@@ -17,8 +17,6 @@ val shrink =
findProperty("kotlin.build.proguard")?.toString()?.toBoolean()
?: hasProperty("teamcity")
val compilerManifestClassPath = "kotlin-stdlib.jar kotlin-reflect.jar kotlin-script-runtime.jar"
val fatJarContents by configurations.creating
val fatJarContentsStripMetadata by configurations.creating
@@ -31,6 +29,7 @@ val compile by configurations // maven plugin writes pom compile scope from com
val libraries by configurations.creating {
extendsFrom(compile)
}
val trove4jJar by configurations.creating
val default by configurations
default.extendsFrom(runtimeJar)
@@ -51,6 +50,7 @@ dependencies {
compile(project(":kotlin-stdlib"))
compile(project(":kotlin-script-runtime"))
compile(project(":kotlin-reflect"))
compile(commonDep("org.jetbrains.intellij.deps", "trove4j"))
libraries(project(":kotlin-annotations-jvm"))
libraries(
@@ -69,6 +69,8 @@ dependencies {
fatSourcesJarContents(it)
}
trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } }
fatJarContents(project(":core:builtins", configuration = "builtins"))
fatJarContents(commonDep("javax.inject"))
fatJarContents(commonDep("org.jline", "jline"))
@@ -79,7 +81,11 @@ dependencies {
fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
fatJarContents(intellijDep()) { includeIntellijCoreJarDependencies(project, { !(it.startsWith("jdom") || it.startsWith("log4j")) }) }
fatJarContents(intellijDep()) {
includeIntellijCoreJarDependencies(project) {
!(it.startsWith("jdom") || it.startsWith("log4j") || it.startsWith("trove4j"))
}
}
when {
Platform[173].orLower() -> {
fatJarContents(intellijDep()) { includeJars("jna-platform") }
@@ -148,10 +154,9 @@ val proguard by task<ProGuardTask> {
val pack = if (shrink) proguard else packCompiler
dist(
targetName = "$compilerBaseName.jar",
fromTask = pack
)
dist(targetName = "$compilerBaseName.jar", fromTask = pack) {
from(trove4jJar)
}
runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) {
name = compilerBaseName
+12 -7
View File
@@ -17,8 +17,6 @@ val shrink =
findProperty("kotlin.build.proguard")?.toString()?.toBoolean()
?: hasProperty("teamcity")
val compilerManifestClassPath = "kotlin-stdlib.jar kotlin-reflect.jar kotlin-script-runtime.jar"
val fatJarContents by configurations.creating
val fatJarContentsStripMetadata by configurations.creating
@@ -31,6 +29,7 @@ val compile by configurations // maven plugin writes pom compile scope from com
val libraries by configurations.creating {
extendsFrom(compile)
}
val trove4jJar by configurations.creating
val default by configurations
default.extendsFrom(runtimeJar)
@@ -51,6 +50,7 @@ dependencies {
compile(project(":kotlin-stdlib"))
compile(project(":kotlin-script-runtime"))
compile(project(":kotlin-reflect"))
compile(commonDep("org.jetbrains.intellij.deps", "trove4j"))
libraries(project(":kotlin-annotations-jvm"))
libraries(
@@ -69,6 +69,8 @@ dependencies {
fatSourcesJarContents(it)
}
trove4jJar(intellijDep()) { includeIntellijCoreJarDependencies(project) { it.startsWith("trove4j") } }
fatJarContents(project(":core:builtins", configuration = "builtins"))
fatJarContents(commonDep("javax.inject"))
fatJarContents(commonDep("org.jline", "jline"))
@@ -79,7 +81,11 @@ dependencies {
fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
fatJarContents(intellijDep()) { includeIntellijCoreJarDependencies(project, { !(it.startsWith("jdom") || it.startsWith("log4j")) }) }
fatJarContents(intellijDep()) {
includeIntellijCoreJarDependencies(project) {
!(it.startsWith("jdom") || it.startsWith("log4j") || it.startsWith("trove4j"))
}
}
fatJarContents(intellijDep()) { includeJars("jna-platform", "lz4-1.3.0") }
fatJarContentsStripServices(intellijDep("jps-standalone")) { includeJars("jps-model") }
fatJarContentsStripMetadata(intellijDep()) { includeJars("oro-2.0.8", "jdom", "log4j" ) }
@@ -136,10 +142,9 @@ val proguard by task<ProGuardTask> {
val pack = if (shrink) proguard else packCompiler
dist(
targetName = "$compilerBaseName.jar",
fromTask = pack
)
dist(targetName = "$compilerBaseName.jar", fromTask = pack) {
from(trove4jJar)
}
runtimeJarArtifactBy(pack, pack.outputs.files.singleFile) {
name = compilerBaseName