-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
29 lines (27 loc) · 1.17 KB
/
build.gradle
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '8.2.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
}
subprojects {
// how to use: ./gradlew assembleRelease -PcomposeCompilerReports=true
tasks.withType(KotlinCompile).configureEach {
compilerOptions {
if (project.findProperty("composeCompilerReports") == "true") {
freeCompilerArgs.addAll([
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_compiler"
])
}
if (project.findProperty("composeCompilerMetrics") == "true") {
freeCompilerArgs.addAll([
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_compiler"
])
}
}
}
}