Diego Costular
09/08/2023, 7:24 PM./gradlew assembleRelease -PenableComposeCompilerMetrics=true -PenableComposeCompilerReports=true
But I get this error:
e: Multiple values are not allowed for plugin option androidx.compose.compiler.plugins.kotlin:metricsDestination
I've configured it as NowInAndroid repository but I had no luck. I saw some related threads like this one and even read that the Kotlin team said that it should be fixed in Kotlin 1.9.x but I'm using Kotlin 1.9.10
Any clue? please 🙇ascii
09/09/2023, 12:21 PMtasks.withType<KotlinCompile>().configureEach
.
kotlin {
compilerOptions {
// Requires a fresh build to show all outputs
val composeMetrics = project.layout.buildDirectory.dir("composeMetrics").get().asFile.path
freeCompilerArgs.addAll(
"-P", "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$composeMetrics",
"-P", "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$composeMetrics",
)
}
}
It's not a multimodule project, and of course this snippet doesn't allow controlling it via flags.ascii
09/09/2023, 12:24 PMreportsDestination
?
As a temporary solution for your method, perhaps you could dedupe freeCompilerArgs
before appending to it.