Remove :libraries:tools:stdlib-compiler-classpath project
It was used as a workaround to allow jvmTarget=1.6 in stdlib.
This commit is contained in:
@@ -28,8 +28,6 @@ dependencies {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
project.applyFixForStdlib16()
|
|
||||||
|
|
||||||
apply(from = "$rootDir/gradle/cacheRedirector.gradle.kts")
|
apply(from = "$rootDir/gradle/cacheRedirector.gradle.kts")
|
||||||
project.configureJvmDefaultToolchain()
|
project.configureJvmDefaultToolchain()
|
||||||
project.addEmbeddedConfigurations()
|
project.addEmbeddedConfigurations()
|
||||||
@@ -201,17 +199,6 @@ fun Project.configureKotlinCompilationOptions() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should the workaround be removed ?
|
|
||||||
// Still compile stdlib, reflect, kotlin.test and scripting runtimes
|
|
||||||
// with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.
|
|
||||||
fun Project.applyFixForStdlib16() {
|
|
||||||
plugins.withType<KotlinBasePluginWrapper>() {
|
|
||||||
dependencies {
|
|
||||||
"kotlinCompilerClasspath"(project(":libraries:tools:stdlib-compiler-classpath"))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Project.configureArtifacts() {
|
fun Project.configureArtifacts() {
|
||||||
tasks.withType<Javadoc>().configureEach {
|
tasks.withType<Javadoc>().configureEach {
|
||||||
enabled = false
|
enabled = false
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ fun CompilerConfiguration.setupJvmSpecificArguments(arguments: K2JVMCompilerArgu
|
|||||||
val jvmTarget = JvmTarget.fromString(jvmTargetValue)
|
val jvmTarget = JvmTarget.fromString(jvmTargetValue)
|
||||||
if (jvmTarget != null) {
|
if (jvmTarget != null) {
|
||||||
put(JVMConfigurationKeys.JVM_TARGET, jvmTarget)
|
put(JVMConfigurationKeys.JVM_TARGET, jvmTarget)
|
||||||
if (jvmTarget == JvmTarget.JVM_1_6 && !isJvmTarget6Allowed()) {
|
if (jvmTarget == JvmTarget.JVM_1_6) {
|
||||||
messageCollector.report(
|
messageCollector.report(
|
||||||
ERROR,
|
ERROR,
|
||||||
"JVM target 1.6 is no longer supported. Please migrate to JVM target 1.8 or above"
|
"JVM target 1.6 is no longer supported. Please migrate to JVM target 1.8 or above"
|
||||||
@@ -378,6 +378,3 @@ private val CompilerConfiguration.messageCollector: MessageCollector
|
|||||||
|
|
||||||
private fun getJavaVersion(): Int =
|
private fun getJavaVersion(): Int =
|
||||||
System.getProperty("java.specification.version")?.substringAfter('.')?.toIntOrNull() ?: 6
|
System.getProperty("java.specification.version")?.substringAfter('.')?.toIntOrNull() ?: 6
|
||||||
|
|
||||||
private fun isJvmTarget6Allowed(): Boolean =
|
|
||||||
K2JVMCompiler::class.java.classLoader.getResource("META-INF/unsafe-allow-jvm6") != null
|
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ fun updateCompilerXml() {
|
|||||||
"libraries/tools/maven-archetypes",
|
"libraries/tools/maven-archetypes",
|
||||||
"libraries/tools/mutability-annotations-compat",
|
"libraries/tools/mutability-annotations-compat",
|
||||||
"libraries/tools/script-runtime",
|
"libraries/tools/script-runtime",
|
||||||
"libraries/tools/stdlib-compiler-classpath",
|
|
||||||
"native/commonizer-api",
|
"native/commonizer-api",
|
||||||
"libraries/examples",
|
"libraries/examples",
|
||||||
"libraries/tools/kotlin-gradle-plugin-idea-proto",
|
"libraries/tools/kotlin-gradle-plugin-idea-proto",
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ JvmToolchain.updateJvmTarget(project, "1.8")
|
|||||||
dependencies {
|
dependencies {
|
||||||
api kotlinStdlib("common")
|
api kotlinStdlib("common")
|
||||||
testApi project(":kotlin-test:kotlin-test-common")
|
testApi project(":kotlin-test:kotlin-test-common")
|
||||||
kotlinCompilerClasspath project(':libraries:tools:stdlib-compiler-classpath')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
plugins {
|
|
||||||
java
|
|
||||||
id("jps-compatible")
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceSets {
|
|
||||||
"main" { projectDefault() }
|
|
||||||
"test" {}
|
|
||||||
}
|
|
||||||
+1
-2
@@ -313,8 +313,7 @@ include ":kotlin-imports-dumper-compiler-plugin",
|
|||||||
":kotlinx-serialization-compiler-plugin",
|
":kotlinx-serialization-compiler-plugin",
|
||||||
":kotlin-serialization",
|
":kotlin-serialization",
|
||||||
":kotlin-serialization-unshaded",
|
":kotlin-serialization-unshaded",
|
||||||
":wasm:wasm.ir",
|
":wasm:wasm.ir"
|
||||||
":libraries:tools:stdlib-compiler-classpath"
|
|
||||||
|
|
||||||
|
|
||||||
include ":kotlinx-atomicfu-compiler-plugin",
|
include ":kotlinx-atomicfu-compiler-plugin",
|
||||||
|
|||||||
Reference in New Issue
Block a user