From 9fbd3fe33f57412838291be54f477e22254dcbb7 Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Sat, 29 Oct 2022 20:37:48 +0700 Subject: [PATCH] build: Add param to generate Compose compiler metrics (#8330) ./gradlew assembledevPreview -Ptachiyomi.enableComposeCompilerMetrics=true --- app/build.gradle.kts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index caa91c4f1..31f76e007 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -329,6 +329,19 @@ tasks { "-opt-in=kotlinx.coroutines.InternalCoroutinesApi", "-opt-in=kotlinx.serialization.ExperimentalSerializationApi", ) + + if (project.findProperty("tachiyomi.enableComposeCompilerMetrics") == "true") { + kotlinOptions.freeCompilerArgs += listOf( + "-P", + "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + + project.buildDir.absolutePath + "/compose_metrics" + ) + kotlinOptions.freeCompilerArgs += listOf( + "-P", + "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + + project.buildDir.absolutePath + "/compose_metrics" + ) + } } preBuild {