fix(build): opt into JSpecify annotations

Jetpack has started using these and recommends the compiler flags
This commit is contained in:
Harsh Shandilya 2024-12-12 15:07:55 +05:30
parent 7b4379ad0f
commit 6dbb1e4e59

View file

@ -43,7 +43,12 @@ class KotlinCommonPlugin : Plugin<Project> {
} }
companion object { companion object {
private val ADDITIONAL_COMPILER_ARGS = listOf("-opt-in=kotlin.RequiresOptIn") private val ADDITIONAL_COMPILER_ARGS =
listOf(
"-opt-in=kotlin.RequiresOptIn",
"-Xjspecify-annotations=strict",
"-Xtype-enhancement-improvements-strict-mode",
)
val JVM_TOOLCHAIN_ACTION = val JVM_TOOLCHAIN_ACTION =
Action<JavaToolchainSpec> { languageVersion.set(JavaLanguageVersion.of(17)) } Action<JavaToolchainSpec> { languageVersion.set(JavaLanguageVersion.of(17)) }