Skip to content

Commit

Permalink
chore: migrate Compose Compiler flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Goooler committed Sep 4, 2024
1 parent 37af4fc commit d31d7e0
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions maps-compose/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,21 @@ android {

kotlinOptions {
jvmTarget = "1.8"
val stabilityConfigurationFile = layout.projectDirectory.file("compose_compiler_stability_config.conf").asFile
freeCompilerArgs += listOf(
"-Xexplicit-api=strict",
"-Xopt-in=kotlin.RequiresOptIn",
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=${stabilityConfigurationFile.absolutePath}"
)
if (findProperty("composeCompilerReports") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${layout.buildDirectory.dir("compose_compiler").get()}",
)
}
if (findProperty("composeCompilerMetrics") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${layout.buildDirectory.dir("compose_compiler").get()}",
)
}
}
}

composeCompiler {
stabilityConfigurationFile =
layout.projectDirectory.file("compose_compiler_stability_config.conf")
if (findProperty("composeCompilerReports") == "true") {
reportsDestination = layout.buildDirectory.dir("compose_compiler")
}
if (findProperty("composeCompilerMetrics") == "true") {
metricsDestination = layout.buildDirectory.dir("compose_compiler")
}
}

Expand Down

0 comments on commit d31d7e0

Please sign in to comment.