-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
50 lines (43 loc) · 1.79 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.jvm) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.google.services) apply false
alias(libs.plugins.firebase.perf) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.compose.compiler) apply false
}
allprojects {
repositories {
mavenCentral()
maven { url "https://jitpack.io" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// To check perfomance run script
// ./gradlew assembleRelease -PcomposeCompilerReports=true
// what's need to pay attention for check here https://github.com/androidx/androidx/blob/androidx-main/compose/compiler/design/compiler-metrics.md#enabling-metrics
subprojects {
tasks.withType(KotlinCompile) {
def dirProperty = project.layout.getProjectDirectory().asFile
def rootDirPath = dirProperty.absolutePath
compilerOptions.freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:stabilityConfigurationPath=$rootDirPath/compose-stability-config.txt"
)
def composeAnalyticsDir = rootDirPath + "/compose_compiler_analytics"
compilerOptions.freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + composeAnalyticsDir,
)
compilerOptions.freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + composeAnalyticsDir,
)
}
}