-
Notifications
You must be signed in to change notification settings - Fork 33
/
build.gradle.kts
36 lines (34 loc) · 1.33 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("com.android.application") version "8.5.1" apply false
id("com.android.library") version "8.5.1" apply false
id("org.jetbrains.kotlin.android") version "1.9.24" apply false
id("com.google.dagger.hilt.android") version "2.50" apply false
id("com.google.devtools.ksp") version "1.9.24-1.0.20" apply false
}
// https://chrisbanes.me/posts/composable-metrics/
// Usage:
// gradlew assembleRelease -PenableComposeCompilerReports=true
// metrics output: ./app/build/compose_metrics
// to force rerun tasks when data is stale:
// gradlew assembleRelease -PenableComposeCompilerReports=true --rerun-tasks
subprojects {
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
if (project.findProperty("enableComposeCompilerReports") == "true") {
freeCompilerArgs +=
listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath +
"/compose_metrics")
freeCompilerArgs +=
listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath +
"/compose_metrics")
}
}
}
}