forked from LemmyNet/jerboa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
47 lines (42 loc) · 1.94 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
46
47
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("com.android.application") version "8.2.2" apply false
id("com.android.library") version "8.2.2" apply false
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
id("com.github.ben-manes.versions") version "0.42.0"
id("org.jmailen.kotlinter") version "4.2.0" apply false
id("com.google.devtools.ksp") version "1.9.22-1.0.16" apply false
id("com.android.test") version "8.2.2" apply false
id("androidx.baselineprofile") version "1.2.2" 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"
println(configPath)
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=$configPath"
)
}
}
}