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