diff options
Diffstat (limited to 'buildSrc/src/main/kotlin/org')
-rw-r--r-- | buildSrc/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/buildSrc/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts b/buildSrc/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts index bd33df22..c40ce57c 100644 --- a/buildSrc/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts +++ b/buildSrc/src/main/kotlin/org/jetbrains/conventions/kotlin-jvm.gradle.kts @@ -1,6 +1,7 @@ package org.jetbrains.conventions import org.jetbrains.configureDokkaVersion +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { @@ -14,16 +15,18 @@ configureDokkaVersion() val language_version: String by project tasks.withType<KotlinCompile>().configureEach { - kotlinOptions { - freeCompilerArgs += listOf( - "-opt-in=kotlin.RequiresOptIn", - "-Xjsr305=strict", - "-Xskip-metadata-version-check", - // need 1.4 support, otherwise there might be problems with Gradle 6.x (it's bundling Kotlin 1.4) - "-Xsuppress-version-warnings" + compilerOptions { + freeCompilerArgs.addAll( + listOf( + "-opt-in=kotlin.RequiresOptIn", + "-Xjsr305=strict", + "-Xskip-metadata-version-check", + // need 1.4 support, otherwise there might be problems with Gradle 6.x (it's bundling Kotlin 1.4) + "-Xsuppress-version-warnings" + ) ) - allWarningsAsErrors = true - languageVersion = language_version - apiVersion = language_version + allWarningsAsErrors.set(true) + languageVersion.set(KotlinVersion.fromVersion(language_version)) + apiVersion.set(KotlinVersion.fromVersion(language_version)) } } |