-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
82 lines (69 loc) · 2.26 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@file:Suppress("DSL_SCOPE_VIOLATION")
import io.gitlab.arturbosch.detekt.extensions.DetektExtension
import org.jlleitschuh.gradle.ktlint.KtlintExtension
plugins {
alias(libs.plugins.gradle.dependency.handler.extensions)
alias(libs.plugins.kotlin.detekt)
alias(libs.plugins.kotlin.ktlint)
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.androidx.room) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.google.service) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.ksp) apply false
}
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath(libs.gradle.kotlin)
}
}
allprojects {
repositories {
google()
mavenCentral()
}
apply {
plugin(rootProject.libs.plugins.kotlin.detekt.get().pluginId)
plugin(rootProject.libs.plugins.kotlin.ktlint.get().pluginId)
plugin(rootProject.libs.plugins.gradle.dependency.handler.extensions.get().pluginId)
}
afterEvaluate {
extensions.configure<DetektExtension> {
parallel = true
buildUponDefaultConfig = true
toolVersion = libs.versions.kotlin.detekt.get()
config.setFrom(files("$rootDir/detekt-config.yml"))
}
extensions.configure<KtlintExtension> {
version.set(rootProject.libs.versions.kotlin.ktlint.source.get())
android.set(true)
verbose.set(true)
}
}
}
tasks.register("cleanAll", type = Delete::class) {
allprojects.map(Project::getBuildDir).forEach(::delete)
}
tasks.register("clean", type = Delete::class) {
rootProject.buildDir.delete()
}
tasks.register("bundleRelease", type = Exec::class) {
commandLine(project.rootDir.resolve("gradlew"), "bundle")
workingDir = project.rootDir
}
tasks.register("release") {
dependsOn(tasks["clean"])
dependsOn(tasks["bundleRelease"])
mustRunAfter(tasks["clean"])
}
apply {
from("gradle/projectDependencyGraph.gradle")
}