-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
45 lines (40 loc) · 1.84 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
45 lines (40 loc) · 1.84 KB
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.13.2" apply false
id("com.android.library") version "8.13.2" apply false
id("com.android.test") version "8.13.2" apply false
id("org.jetbrains.kotlin.android") version "2.4.0" apply false
id("org.jmailen.kotlinter") version "5.5.0" apply false
id("com.google.devtools.ksp") version "2.3.9" apply false
id("androidx.baselineprofile") version "1.4.1" 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"
)
}
}
}