Pin API and language version to 1.8 for Kotlin facet serialization used by IJ

Facet serialization is located in Kotlin repo, and it uses new(1.9.*) stdlib in compile dependencies. But when it is used by IJ it has previous runtime stdlib dependency (looks like 1.8.0). So here is workaround, that specifies apiVersion and languageVersion, that does not produce such problematic outputs.

#KTIJ-24903 Fixed

Merge-request: KT-MR-9333
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
This commit is contained in:
Aleksei.Cherepanov
2023-04-03 09:24:21 +00:00
committed by Space Team
parent 118c62cfbb
commit 5c039e25fc
3 changed files with 24 additions and 0 deletions
+8
View File
@@ -1,3 +1,6 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
plugins {
kotlin("jvm")
id("jps-compatible")
@@ -38,3 +41,8 @@ sourceSets {
}
runtimeJar()
tasks.withType<KotlinCompilationTask<*>>().configureEach {
compilerOptions.apiVersion.value(KotlinVersion.KOTLIN_1_8).finalizeValueOnRead()
compilerOptions.languageVersion.value(KotlinVersion.KOTLIN_1_8).finalizeValueOnRead()
}