Drop coroutines from compiler jar, add appropriate plugin dependency
#KT-30778 fixed
This commit is contained in:
@@ -20,7 +20,6 @@ val packagesToRelocate =
|
|||||||
"org.picocontainer",
|
"org.picocontainer",
|
||||||
"org.jline",
|
"org.jline",
|
||||||
"org.fusesource",
|
"org.fusesource",
|
||||||
"kotlinx.coroutines",
|
|
||||||
"net.jpountz",
|
"net.jpountz",
|
||||||
"one.util.streamex",
|
"one.util.streamex",
|
||||||
"kotlinx.collections.immutable"
|
"kotlinx.collections.immutable"
|
||||||
|
|||||||
@@ -83,7 +83,9 @@ object PathUtil {
|
|||||||
|
|
||||||
val KOTLIN_SCRIPTING_PLUGIN_CLASSPATH_JARS = arrayOf(
|
val KOTLIN_SCRIPTING_PLUGIN_CLASSPATH_JARS = arrayOf(
|
||||||
KOTLIN_SCRIPTING_COMPILER_PLUGIN_JAR, KOTLIN_SCRIPTING_COMPILER_IMPL_JAR,
|
KOTLIN_SCRIPTING_COMPILER_PLUGIN_JAR, KOTLIN_SCRIPTING_COMPILER_IMPL_JAR,
|
||||||
KOTLIN_SCRIPTING_COMMON_JAR, KOTLIN_SCRIPTING_JVM_JAR, KOTLIN_SCRIPTING_JS_JAR, JS_ENGINES_JAR
|
KOTLINX_COROUTINES_CORE_JAR,
|
||||||
|
KOTLIN_SCRIPTING_COMMON_JAR, KOTLIN_SCRIPTING_JVM_JAR,
|
||||||
|
KOTLIN_SCRIPTING_JS_JAR, JS_ENGINES_JAR
|
||||||
)
|
)
|
||||||
|
|
||||||
const val KOTLIN_TEST_NAME = "kotlin-test"
|
const val KOTLIN_TEST_NAME = "kotlin-test"
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ dependencies {
|
|||||||
fatJarContents(protobufFull())
|
fatJarContents(protobufFull())
|
||||||
fatJarContents(commonDep("com.google.code.findbugs", "jsr305"))
|
fatJarContents(commonDep("com.google.code.findbugs", "jsr305"))
|
||||||
fatJarContents(commonDep("io.javaslang", "javaslang"))
|
fatJarContents(commonDep("io.javaslang", "javaslang"))
|
||||||
fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
|
||||||
|
|
||||||
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
|
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")) }) }
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ val proguard by task<CacheableProguardTask> {
|
|||||||
dependsOn(relocatedJar)
|
dependsOn(relocatedJar)
|
||||||
configuration("main-kts.pro")
|
configuration("main-kts.pro")
|
||||||
|
|
||||||
injars(mapOf("filter" to "!META-INF/versions/**"), relocatedJar.get().outputs.files)
|
injars(mapOf("filter" to "!META-INF/versions/**,!kotlinx/coroutines/debug/**"), relocatedJar.get().outputs.files)
|
||||||
|
|
||||||
outjars(fileFrom(buildDir, "libs", "$jarBaseName-$version-after-proguard.jar"))
|
outjars(fileFrom(buildDir, "libs", "$jarBaseName-$version-after-proguard.jar"))
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
-dontwarn org.bouncycastle.**
|
-dontwarn org.bouncycastle.**
|
||||||
-dontwarn org.apache.ivy.ant.**
|
-dontwarn org.apache.ivy.ant.**
|
||||||
-dontwarn kotlin.annotations.jvm.**
|
-dontwarn kotlin.annotations.jvm.**
|
||||||
|
# hopefully temporarily, for coroutines
|
||||||
|
-dontwarn kotlin.time.**
|
||||||
|
|
||||||
-keep class org.jetbrains.kotlin.mainKts.** { *; }
|
-keep class org.jetbrains.kotlin.mainKts.** { *; }
|
||||||
-keep class kotlin.script.experimental.** { *; }
|
-keep class kotlin.script.experimental.** { *; }
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ val libraries by configurations.creating {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val librariesStripVersion by configurations.creating
|
||||||
|
|
||||||
// Compiler plugins should be copied without `kotlin-` prefix
|
// Compiler plugins should be copied without `kotlin-` prefix
|
||||||
val compilerPlugins by configurations.creating {
|
val compilerPlugins by configurations.creating {
|
||||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-common")
|
exclude("org.jetbrains.kotlin", "kotlin-stdlib-common")
|
||||||
@@ -153,6 +155,8 @@ dependencies {
|
|||||||
libraries(project(":kotlin-test:kotlin-test-js", configuration = "distLibrary"))
|
libraries(project(":kotlin-test:kotlin-test-js", configuration = "distLibrary"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
librariesStripVersion(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
||||||
|
|
||||||
distLibraryProjects.forEach {
|
distLibraryProjects.forEach {
|
||||||
libraries(project(it)) { isTransitive = false }
|
libraries(project(it)) { isTransitive = false }
|
||||||
}
|
}
|
||||||
@@ -196,7 +200,6 @@ dependencies {
|
|||||||
fatJarContents(protobufFull())
|
fatJarContents(protobufFull())
|
||||||
fatJarContents(commonDep("com.google.code.findbugs", "jsr305"))
|
fatJarContents(commonDep("com.google.code.findbugs", "jsr305"))
|
||||||
fatJarContents(commonDep("io.javaslang", "javaslang"))
|
fatJarContents(commonDep("io.javaslang", "javaslang"))
|
||||||
fatJarContents(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false }
|
|
||||||
fatJarContents(commonDep("org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm")) { isTransitive = false }
|
fatJarContents(commonDep("org.jetbrains.kotlinx:kotlinx-collections-immutable-jvm")) { isTransitive = false }
|
||||||
|
|
||||||
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
|
fatJarContents(intellijCoreDep()) { includeJars("intellij-core") }
|
||||||
@@ -342,6 +345,11 @@ val distKotlinc = distTask<Sync>("distKotlinc") {
|
|||||||
into("lib") {
|
into("lib") {
|
||||||
from(jar) { rename { "$compilerBaseName.jar" } }
|
from(jar) { rename { "$compilerBaseName.jar" } }
|
||||||
from(libraries)
|
from(libraries)
|
||||||
|
from(librariesStripVersion) {
|
||||||
|
rename {
|
||||||
|
it.replace(Regex("-\\d.*\\.jar\$"), ".jar")
|
||||||
|
}
|
||||||
|
}
|
||||||
from(sources)
|
from(sources)
|
||||||
from(compilerPlugins) {
|
from(compilerPlugins) {
|
||||||
rename { it.removePrefix("kotlin-") }
|
rename { it.removePrefix("kotlin-") }
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
-dontwarn com.intellij.ui.**
|
-dontwarn com.intellij.ui.**
|
||||||
-dontwarn com.intellij.util.IconUtil
|
-dontwarn com.intellij.util.IconUtil
|
||||||
-dontwarn com.intellij.util.ImageLoader
|
-dontwarn com.intellij.util.ImageLoader
|
||||||
-dontwarn kotlinx.coroutines.flow.FlowKt__MergeKt
|
|
||||||
-dontwarn net.sf.cglib.**
|
-dontwarn net.sf.cglib.**
|
||||||
-dontwarn org.objectweb.asm.** # this is ASM3, the old version that we do not use
|
-dontwarn org.objectweb.asm.** # this is ASM3, the old version that we do not use
|
||||||
-dontwarn com.sun.jna.NativeString
|
-dontwarn com.sun.jna.NativeString
|
||||||
@@ -64,7 +63,6 @@
|
|||||||
-dontwarn org.w3c.dom.Window
|
-dontwarn org.w3c.dom.Window
|
||||||
-dontwarn org.slf4j.**
|
-dontwarn org.slf4j.**
|
||||||
|
|
||||||
|
|
||||||
#-libraryjars '<rtjar>'
|
#-libraryjars '<rtjar>'
|
||||||
#-libraryjars '<jssejar>'
|
#-libraryjars '<jssejar>'
|
||||||
#-libraryjars '<bootstrap.runtime>'
|
#-libraryjars '<bootstrap.runtime>'
|
||||||
@@ -219,9 +217,6 @@
|
|||||||
-keep class com.sun.tools.javac.** { *; }
|
-keep class com.sun.tools.javac.** { *; }
|
||||||
-keep class com.sun.source.** { *; }
|
-keep class com.sun.source.** { *; }
|
||||||
|
|
||||||
# for coroutines
|
|
||||||
-keep class kotlinx.coroutines.** { *; }
|
|
||||||
|
|
||||||
# for webdemo
|
# for webdemo
|
||||||
-keep class com.intellij.openapi.progress.ProgressManager { *; }
|
-keep class com.intellij.openapi.progress.ProgressManager { *; }
|
||||||
|
|
||||||
|
|||||||
@@ -218,9 +218,6 @@
|
|||||||
-keep class com.sun.tools.javac.** { *; }
|
-keep class com.sun.tools.javac.** { *; }
|
||||||
-keep class com.sun.source.** { *; }
|
-keep class com.sun.source.** { *; }
|
||||||
|
|
||||||
# for coroutines
|
|
||||||
-keep class kotlinx.coroutines.** { *; }
|
|
||||||
|
|
||||||
# for webdemo
|
# for webdemo
|
||||||
-keep class com.intellij.openapi.progress.ProgressManager { *; }
|
-keep class com.intellij.openapi.progress.ProgressManager { *; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user