-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
38 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
37
38
plugins {
id("com.android.application") version "7.4.2" apply false
id("com.android.library") version "7.4.2" apply false
id("org.jetbrains.kotlin.android") version "1.8.0" apply false
id("org.jetbrains.kotlin.jvm") version "1.8.0" apply false
}
subprojects {
// ./gradlew assembleDebug -Papp.enableComposeCompilerReports=true
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
val args = mutableListOf("-Xopt-in=kotlin.RequiresOptIn")
if (project.findProperty("app.enableComposeCompilerReports") == "true") {
args.addAll(
listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
)
)
args.addAll(
listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
)
)
}
freeCompilerArgs = args
}
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.buildDir)
}