forked from LemmyNet/jerboa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
40 lines (35 loc) · 1.62 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("com.android.application") version "8.1.0" apply false
id("com.android.library") version "8.1.0" apply false
id("org.jetbrains.kotlin.android") version "1.8.20" apply false
id("com.github.ben-manes.versions") version "0.42.0"
id("org.jmailen.kotlinter") version "3.15.0" apply false
id("com.google.devtools.ksp") version "1.8.21-1.0.11" apply false
id( "com.android.test") version "8.1.0" apply false
id( "androidx.baselineprofile") version "1.2.0-alpha13" 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 com.jerboa.enableComposeCompilerReports=true`
// see https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md
subprojects {
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
if (project.findProperty("com.jerboa.enableComposeCompilerReports") == "true") {
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
)
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" +
project.buildDir.absolutePath + "/compose_metrics"
)
}
}
}
}