-
Notifications
You must be signed in to change notification settings - Fork 166
/
build.gradle.kts
45 lines (40 loc) · 1.85 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
39
40
41
42
43
44
45
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("com.android.application") version "8.6.0" apply false
id("com.android.library") version "8.6.0" apply false
id("org.jetbrains.kotlin.android") version "2.0.20" apply false
id("org.jmailen.kotlinter") version "4.4.1" apply false
id("com.google.devtools.ksp") version "2.0.20-1.0.25" apply false
id("com.android.test") version "8.6.0" apply false
id("androidx.baselineprofile") version "1.3.0" apply false
}
subprojects {
apply(plugin = "org.jmailen.kotlinter") // Version should be inherited from parent
}
// Enables compose compiler metrics
// Generate them with `./gradlew assembleRelease --rerun-tasks -P enableComposeCompilerReports=true`
// see https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md
subprojects {
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
val destination = project.layout.buildDirectory.get().asFile.absolutePath
if (project.findProperty("enableComposeCompilerReports") == "true") {
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
destination + "/compose_metrics"
)
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
destination + "/compose_metrics"
)
}
val configPath = "${project.projectDir.absolutePath}/../compose_compiler_config.conf"
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=$configPath"
)
}
}
}