[Build] Pin api and language level to 1.8 in Kotlin compiler modules used by KGP
This is required to be able to compile KGP and it's dependencies which set LV to 1.4 when repo will use LV 1.9. This caused by the change how enums are compiled (KT-48872).
This commit is contained in:
committed by
Space Team
parent
4ab39b908e
commit
0cad069522
@@ -1,3 +1,6 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
|
||||
|
||||
description = "Kotlin Daemon Client"
|
||||
|
||||
plugins {
|
||||
@@ -35,11 +38,14 @@ dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||
kotlinOptions {
|
||||
tasks.withType<KotlinCompilationTask<*>> {
|
||||
compilerOptions {
|
||||
// This module is being run from within Gradle, older versions of which only have older kotlin-stdlib in the runtime classpath.
|
||||
apiVersion = "1.4"
|
||||
freeCompilerArgs += "-Xsuppress-version-warnings"
|
||||
@Suppress("DEPRECATION")
|
||||
apiVersion.set(KotlinVersion.KOTLIN_1_4)
|
||||
@Suppress("DEPRECATION")
|
||||
languageVersion.set(KotlinVersion.KOTLIN_1_4)
|
||||
freeCompilerArgs.add("-Xsuppress-version-warnings")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user