Skip to content

Commit

Permalink
Merge pull request #25 from yveskalume/compose-metrics
Browse files Browse the repository at this point in the history
Enable Compose compiler reports
  • Loading branch information
yveskalume authored Mar 17, 2024
2 parents 6759576 + 60464f5 commit 30a3fa3
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,24 @@ plugins {
alias(libs.plugins.androidTest) apply false

}
true // Needed to make the Suppress annotation work for the plugins block

subprojects {
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
if (project.findProperty("composeCompilerReports") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${project.buildDir.absolutePath}/compose_compiler"
)
}
if (project.findProperty("composeCompilerMetrics") == "true") {
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${project.buildDir.absolutePath}/compose_compiler"
)
}
}
}
}

true // Needed to make the Suppress annotation work for the plugins block

0 comments on commit 30a3fa3

Please sign in to comment.