Mikolaj
08/28/2023, 12:14 PMSaurabhS
08/28/2023, 5:05 PMallprojects {
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile::class.java).configureEach {
kotlinOptions {
// Trigger this with:
// ./gradlew build -PenableMultiModuleComposeReports=true --rerun-tasks
if (project.findProperty("enableMultiModuleComposeReports") == "true") {
val path = layout.buildDirectory.dir("compose_metrics").get().asFile.absolutePath
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=$path",
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=$path",
)
}
}
}
}