Remove LV/AV customization for the compiler CLI modules
The customization was added for compatibility with Gradle. That isn't a problem anymore, as we don't use it from KGP and soon we will eliminate the direct dependency on kotlin-compiler from KGP.
This commit is contained in:
committed by
Space Team
parent
44d9a2136b
commit
877438b1f3
@@ -51,13 +51,9 @@ allprojects {
|
|||||||
optInToExperimentalCompilerApi()
|
optInToExperimentalCompilerApi()
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile> {
|
||||||
kotlinOptions {
|
compilerOptions {
|
||||||
languageVersion = "1.4"
|
progressiveMode.set(true)
|
||||||
apiVersion = "1.4"
|
|
||||||
freeCompilerArgs = freeCompilerArgs - "-progressive" + listOf(
|
|
||||||
"-Xskip-prerelease-check", "-Xsuppress-version-warnings", "-Xuse-mixed-named-arguments"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,13 +36,9 @@ allprojects {
|
|||||||
optInToExperimentalCompilerApi()
|
optInToExperimentalCompilerApi()
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile> {
|
||||||
kotlinOptions {
|
compilerOptions {
|
||||||
languageVersion = "1.4"
|
progressiveMode.set(true)
|
||||||
apiVersion = "1.4"
|
|
||||||
freeCompilerArgs = freeCompilerArgs - "-progressive" + listOf(
|
|
||||||
"-Xskip-prerelease-check", "-Xsuppress-version-warnings", "-Xuse-mixed-named-arguments"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -20,7 +20,7 @@ class ByteArrayCharSequence(
|
|||||||
|
|
||||||
override val length get() = end - start
|
override val length get() = end - start
|
||||||
|
|
||||||
override fun get(index: Int): Char = bytes[index + start].toChar()
|
override fun get(index: Int): Char = bytes[index + start].toInt().toChar()
|
||||||
|
|
||||||
override fun subSequence(startIndex: Int, endIndex: Int): CharSequence {
|
override fun subSequence(startIndex: Int, endIndex: Int): CharSequence {
|
||||||
if (startIndex == 0 && endIndex == length) return this
|
if (startIndex == 0 && endIndex == length) return this
|
||||||
@@ -31,7 +31,7 @@ class ByteArrayCharSequence(
|
|||||||
val chars = CharArray(length)
|
val chars = CharArray(length)
|
||||||
|
|
||||||
for (i in 0 until length) {
|
for (i in 0 until length) {
|
||||||
chars[i] = bytes[i + start].toChar()
|
chars[i] = bytes[i + start].toInt().toChar()
|
||||||
}
|
}
|
||||||
|
|
||||||
return String(chars)
|
return String(chars)
|
||||||
|
|||||||
+2
-1
@@ -30,6 +30,7 @@ import org.jetbrains.kotlin.resolve.jvm.modules.JavaModule
|
|||||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleFinder
|
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleFinder
|
||||||
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleInfo
|
import org.jetbrains.kotlin.resolve.jvm.modules.JavaModuleInfo
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
import java.util.*
|
||||||
|
|
||||||
class CliJavaModuleFinder(
|
class CliJavaModuleFinder(
|
||||||
private val jdkHome: File?,
|
private val jdkHome: File?,
|
||||||
@@ -176,7 +177,7 @@ class CliJavaModuleFinder(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun codeFor(release: Int): String = release.toString(36).toUpperCase()
|
private fun codeFor(release: Int): String = release.toString(36).uppercase(Locale.getDefault())
|
||||||
|
|
||||||
private fun matchesRelease(fileName: String, release: Int) =
|
private fun matchesRelease(fileName: String, release: Int) =
|
||||||
!fileName.contains("-") && fileName.contains(codeFor(release)) // skip `*-modules`
|
!fileName.contains("-") && fileName.contains(codeFor(release)) // skip `*-modules`
|
||||||
|
|||||||
Reference in New Issue
Block a user