aboutsummaryrefslogtreecommitdiff
path: root/build-logic/src/main
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-04-10 16:00:07 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-04-10 16:20:59 +0530
commit5e3c08f1da0adb22eee616b8695bdf5b446205e0 (patch)
tree3e4918a8a9942585c72d9d3cb89c9aafd4559eb9 /build-logic/src/main
parent5ab0c53d0396669ea17eea5c18937b5300b1f437 (diff)
feat(deps): migrate to Kotlin 1.8.20
Diffstat (limited to 'build-logic/src/main')
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt15
1 files changed, 10 insertions, 5 deletions
diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt
index 763b37d3..e7ca2219 100644
--- a/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt
+++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt
@@ -16,6 +16,8 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.withType
import org.gradle.language.base.plugins.LifecycleBasePlugin
+import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
+import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@Suppress("Unused")
@@ -43,11 +45,13 @@ class KotlinCommonPlugin : Plugin<Project> {
targetCompatibility = JavaVersion.VERSION_11.toString()
}
withType<KotlinCompile>().configureEach {
- kotlinOptions {
- allWarningsAsErrors = true
- jvmTarget = JavaVersion.VERSION_11.toString()
- freeCompilerArgs = freeCompilerArgs + ADDITIONAL_COMPILER_ARGS
- languageVersion = "1.5"
+ kotlinOptions { jvmTarget = JavaVersion.VERSION_11.toString() }
+ }
+ withType<KotlinCompilationTask<*>>().configureEach {
+ compilerOptions {
+ allWarningsAsErrors.set(true)
+ languageVersion.set(KotlinVersion.KOTLIN_1_5)
+ freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
}
}
withType<Test>().configureEach {
@@ -61,6 +65,7 @@ class KotlinCommonPlugin : Plugin<Project> {
private val ADDITIONAL_COMPILER_ARGS =
listOf(
"-opt-in=kotlin.RequiresOptIn",
+ "-Xsuppress-version-warnings",
)
}
}