From ffd5e753e7ca25a94cc528ceafe56ec0862afd63 Mon Sep 17 00:00:00 2001 From: pluu Date: Sat, 22 Jun 2024 12:05:37 +0900 Subject: [PATCH] Update Kotlin compile options --- .../main/java/com/pluu/convention/KotlinAndroid.kt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/build-logic/convention/src/main/java/com/pluu/convention/KotlinAndroid.kt b/build-logic/convention/src/main/java/com/pluu/convention/KotlinAndroid.kt index 851d8c5e..b155ed1b 100644 --- a/build-logic/convention/src/main/java/com/pluu/convention/KotlinAndroid.kt +++ b/build-logic/convention/src/main/java/com/pluu/convention/KotlinAndroid.kt @@ -43,15 +43,12 @@ internal fun Project.configureKotlin() { compilerOptions { // Set JVM target jvmTarget.set(Const.JVM_TARGET) -// allWarningsAsErrors = true +// allWarningsAsErrors.set(true) - freeCompilerArgs.addAll( - listOf( - "-opt-in=kotlin.RequiresOptIn", - // Enable experimental coroutines APIs, including Flow - "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi", - "-opt-in=kotlinx.coroutines.FlowPreview", - ) + optIn.addAll( + "kotlin.RequiresOptIn", + "kotlinx.coroutines.ExperimentalCoroutinesApi", + "kotlinx.coroutines.FlowPreview", ) } }