From aabaed5177e6ad34989398983c016422a7ceae19 Mon Sep 17 00:00:00 2001 From: Syer10 Date: Thu, 25 Aug 2022 19:29:26 -0400 Subject: [PATCH] Support compose compiler metrics --- build.gradle.kts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0b6352f2..bc848f4e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -50,9 +50,16 @@ tasks.withType { kotlinOptions { - /*freeCompilerArgs = freeCompilerArgs + listOf( - "-Xjvm-default=compatibility", - )*/ + if (project.hasProperty("generateComposeCompilerMetrics")) { + freeCompilerArgs = freeCompilerArgs + listOf( + "-P", + "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + + project.buildDir.absolutePath + "/compose_metrics", + "-P", + "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + + project.buildDir.absolutePath + "/compose_metrics" + ) + } } } tasks.withType {