|
|
|
@ -55,10 +55,10 @@ private fun Project.buildComposeMetricsParameters(): List<String> {
|
|
|
|
|
val metricParameters = mutableListOf<String>()
|
|
|
|
|
val enableMetricsProvider = project.providers.gradleProperty("enableComposeCompilerMetrics")
|
|
|
|
|
val relativePath = projectDir.relativeTo(rootDir)
|
|
|
|
|
|
|
|
|
|
val buildDir = layout.buildDirectory.get().asFile
|
|
|
|
|
val enableMetrics = (enableMetricsProvider.orNull == "true")
|
|
|
|
|
if (enableMetrics) {
|
|
|
|
|
val metricsFolder = rootProject.buildDir.resolve("compose-metrics").resolve(relativePath)
|
|
|
|
|
val metricsFolder = buildDir.resolve("compose-metrics").resolve(relativePath)
|
|
|
|
|
metricParameters.add("-P")
|
|
|
|
|
metricParameters.add(
|
|
|
|
|
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + metricsFolder.absolutePath
|
|
|
|
@ -68,7 +68,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").resolve(relativePath)
|
|
|
|
|
val reportsFolder = buildDir.resolve("compose-reports").resolve(relativePath)
|
|
|
|
|
metricParameters.add("-P")
|
|
|
|
|
metricParameters.add(
|
|
|
|
|
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + reportsFolder.absolutePath
|
|
|
|
|