Add enableComposeCompilerReports flag
This commit is contained in:
parent
a0fd9b23b1
commit
17a5e603b3
1 changed files with 14 additions and 0 deletions
|
@ -14,3 +14,17 @@ buildscript {
|
||||||
tasks.register("clean", Delete::class) {
|
tasks.register("clean", Delete::class) {
|
||||||
delete(rootProject.buildDir)
|
delete(rootProject.buildDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
subprojects {
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().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"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue