👉 Issues with Gradle Kotlin DSL and `-Xopt-in` deprecation : KT-51708
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
allWarningsAsErrors = false
freeCompilerArgs += [
"-Xopt-in=kotlin.RequiresOptIn",
"-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-Xopt-in=kotlinx.coroutines.FlowPreview",
"-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
"-Xopt-in=kotlin.Experimental",
]
}
}
'-Xopt-in' → '-opt-in'
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
allWarningsAsErrors = false
freeCompilerArgs += [
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.FlowPreview",
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
"-opt-in=kotlin.Experimental",
]
}
}
単純に gradle ファイル内、文字列の置換で完。
コード内アノテーションで利用の人はそのままでいいんかな。
👉 Opt-in requirement marker annotation on override requires the same marker on base declaration
👉 AGP Upgrade Assistant で 7.2 移行時にCause: manifestData.`package` must not be null
👉 @Composable Scaffold で This material API is experimental and is likely to change or to be removed in the future.