|
|
|
@ -58,11 +58,11 @@ internal fun Project.configureAndroidCompose(
|
|
|
|
|
private fun Project.buildComposeMetricsParameters(): List<String> {
|
|
|
|
|
val metricParameters = mutableListOf<String>()
|
|
|
|
|
val enableMetricsProvider = project.providers.gradleProperty("enableComposeCompilerMetrics")
|
|
|
|
|
val projectPath = project.path.replace(':', '_').drop(1)
|
|
|
|
|
val relativePath = projectDir.relativeTo(rootDir)
|
|
|
|
|
|
|
|
|
|
val enableMetrics = (enableMetricsProvider.orNull == "true")
|
|
|
|
|
if (enableMetrics) {
|
|
|
|
|
val metricsFolder = rootProject.buildDir.resolve("compose-metrics/$projectPath")
|
|
|
|
|
val metricsFolder = rootProject.buildDir.resolve("compose-metrics").resolve(relativePath)
|
|
|
|
|
metricParameters.add("-P")
|
|
|
|
|
metricParameters.add(
|
|
|
|
|
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + metricsFolder.absolutePath
|
|
|
|
@ -72,7 +72,7 @@ private fun Project.buildComposeMetricsParameters(): List<String> {
|
|
|
|
|
val enableReportsProvider = project.providers.gradleProperty("enableComposeCompilerReports")
|
|
|
|
|
val enableReports = (enableReportsProvider.orNull == "true")
|
|
|
|
|
if (enableReports) {
|
|
|
|
|
val reportsFolder = rootProject.buildDir.resolve("compose-reports/$projectPath")
|
|
|
|
|
val reportsFolder = rootProject.buildDir.resolve("compose-reports").resolve(relativePath)
|
|
|
|
|
metricParameters.add("-P")
|
|
|
|
|
metricParameters.add(
|
|
|
|
|
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + reportsFolder.absolutePath
|
|
|
|
|