compose: Drop all optin for experimental APIs

Too many of them at this point. Simply set them in compiler arguments
and revisit to remove after 2-3 years.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-08-19 15:26:53 +08:00
parent 0432dc0f00
commit a9afd0785e
21 changed files with 14 additions and 50 deletions

View File

@@ -23,6 +23,7 @@
import com.google.devtools.ksp.KspExperimental
import java.util.Properties
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.android.application)
@@ -43,6 +44,19 @@ val lastCommitHash = providers.exec {
kotlin {
jvmToolchain(21)
compilerOptions {
jvmTarget = JvmTarget.JVM_21
freeCompilerArgs.addAll(
"-Xannotation-default-target=param-property"
)
optIn.addAll(
"androidx.compose.material3.ExperimentalMaterial3Api",
"androidx.compose.material3.ExperimentalMaterial3ExpressiveApi",
"androidx.compose.foundation.layout.ExperimentalLayoutApi",
"androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi",
"coil3.annotation.ExperimentalCoilApi"
)
}
}
android {
@@ -140,10 +154,6 @@ android {
compose = true
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_21.toString()
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21