diff --git a/build.gradle.kts b/build.gradle.kts index f9e87b2..d42bfaf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -14,3 +14,17 @@ buildscript { tasks.register("clean", Delete::class) { delete(rootProject.buildDir) } + +subprojects { + tasks.withType().configureEach { + kotlinOptions { + if (project.findProperty("enableComposeCompilerReports") == "true") { + arrayOf("reports", "metrics").forEach { + freeCompilerArgs = freeCompilerArgs + listOf( + "-P", "plugin:androidx.compose.compiler.plugins.kotlin:${it}Destination=${project.buildDir.absolutePath}/compose_metrics" + ) + } + } + } + } +}