generated from Valkiria-Project/Android-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
51 lines (46 loc) · 1.95 KB
/
build.gradle.kts
File metadata and controls
51 lines (46 loc) · 1.95 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
46
47
48
49
50
51
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.androidLibrary) apply false
alias(libs.plugins.benManesversions) apply true
alias(libs.plugins.composeCompiler) apply false
alias(libs.plugins.daggerHilt) apply false
alias(libs.plugins.detekt) apply true
alias(libs.plugins.googleServices) apply false
alias(libs.plugins.kotlinAndroid) apply false
alias(libs.plugins.kotlinKsp) apply false
alias(libs.plugins.kotlinParcelize) apply false
alias(libs.plugins.kotlinSerialization) apply false
alias(libs.plugins.ktlint) apply true
alias(libs.plugins.paparazzi) apply false
}
apply(from = "buildscripts/githooks.gradle")
subprojects {
apply(from = "../buildscripts/ktlint.gradle")
apply(from = "../buildscripts/detekt.gradle")
apply(from = "../buildscripts/versionsplugin.gradle")
// Compose metric configuration
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
compilerOptions {
if (project.findProperty("composeCompilerReports") == "true") {
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${project.layout.buildDirectory.get().asFile.absolutePath}/compose_compiler"
)
}
if (project.findProperty("composeCompilerMetrics") == "true") {
freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${project.layout.buildDirectory.get().asFile.absolutePath}/compose_compiler"
)
}
}
}
}
task("clean") {
delete(rootProject.layout.buildDirectory)
}
afterEvaluate {
// We install the hook at the first occasion
tasks["clean"].dependsOn("installGitHooks")
}