[Repo] Don't use kotlinOptions in repo build scripts
^KT-63419 In Progress
This commit is contained in:
committed by
Space Team
parent
22e1e79c41
commit
6b19b8b9d0
@@ -1,3 +1,5 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JsMainFunctionExecutionMode
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.konan.target.HostManager
|
||||
import org.jetbrains.kotlin.UtilsKt
|
||||
|
||||
@@ -100,10 +102,12 @@ kotlin {
|
||||
targets {
|
||||
fromPreset(presets.jvm, 'jvm') {
|
||||
compilations.all {
|
||||
tasks[compileKotlinTaskName].kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
compileTaskProvider.configure {
|
||||
compilerOptions {
|
||||
jvmTarget = JvmTarget.JVM_1_8
|
||||
suppressWarnings = true
|
||||
}
|
||||
}
|
||||
tasks[compileKotlinTaskName].kotlinOptions.suppressWarnings = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,8 +151,8 @@ kotlin {
|
||||
}
|
||||
}
|
||||
fromPreset(presets.js, 'js') {
|
||||
compilations.main.kotlinOptions {
|
||||
main = "noCall"
|
||||
compilations.main.compileTaskProvider.configure {
|
||||
compilerOptions.main = JsMainFunctionExecutionMode.NO_CALL
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
||||
import java.util.Properties
|
||||
import java.io.FileReader
|
||||
|
||||
@@ -50,9 +51,13 @@ sourceSets["main"].kotlin {
|
||||
srcDir("../../../../native/utils/src")
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions.freeCompilerArgs +=
|
||||
listOf("-opt-in=kotlin.RequiresOptIn", "-opt-in=kotlin.ExperimentalStdlibApi")
|
||||
tasks.withType<KotlinJvmCompile>().configureEach {
|
||||
compilerOptions.optIn.addAll(
|
||||
listOf(
|
||||
"kotlin.RequiresOptIn",
|
||||
"kotlin.ExperimentalStdlibApi",
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -87,10 +92,10 @@ dependencies {
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
languageVersion = "1.4"
|
||||
apiVersion = "1.4"
|
||||
tasks.withType<KotlinJvmCompile>().configureEach {
|
||||
compilerOptions {
|
||||
languageVersion = KotlinVersion.KOTLIN_1_4
|
||||
apiVersion = KotlinVersion.KOTLIN_1_4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user