-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
125 lines (99 loc) · 3.29 KB
/
build.gradle.kts
File metadata and controls
125 lines (99 loc) · 3.29 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import jacoco.setupJacocoMergingRoot
import nl.littlerobots.vcu.plugin.resolver.ModuleVersionCandidate
import nl.littlerobots.vcu.plugin.versionSelector
// Please do not add any subprojects {} / allprojects {} blocks or anything else that affects suborpojects to allow for
// project isolation when it comes out (https://gradle.github.io/configuration-cache/#project_isolation)
plugins {
id("com.autonomousapps.dependency-analysis")
alias(libs.plugins.versionCatalogUpdate)
id("kotlinova")
jacoco
}
setupJacocoMergingRoot()
jacoco {
toolVersion = libs.versions.jacoco.get()
}
dependencyAnalysis {
structure {
ignoreKtx(true)
bundle("coil") {
// We only ever want coil-compose, so coil is considered as a group
includeGroup("io.coil-kt.coil3")
}
bundle("compose") {
// Compose libraries are blanket-included to for convenience. It shouldn't cause a big issue
includeGroup("androidx.compose.animation")
includeGroup("androidx.compose.foundation")
includeGroup("androidx.compose.material")
includeGroup("androidx.compose.material3")
includeGroup("androidx.compose.runtime")
includeGroup("androidx.compose.ui")
}
// Library Groups:
bundle("androidxActivity") {
includeGroup("androidx.activity")
}
bundle("androidxBenchmark") {
includeGroup("androidx.benchmark")
}
bundle("androidxCore") {
includeGroup("androidx.core")
}
bundle("androidxLifecycle") {
includeGroup("androidx.lifecycle")
}
bundle("androidxTest") {
includeGroup("androidx.test")
}
bundle("inject") {
includeGroup("me.tatarka.inject")
includeGroup("software.amazon.lastmile.kotlin.inject.anvil")
}
bundle("datastore") {
includeGroup("androidx.datastore")
}
bundle("kotest") {
includeGroup("io.kotest")
}
bundle("showkase") {
includeGroup("com.airbnb.android")
}
bundle("sqlDelight") {
includeGroup("app.cash.sqldelight")
}
bundle("dagger") {
includeGroup("com.google.dagger")
includeDependency("javax.inject:javax.inject")
}
bundle("kotlinxDatetime") {
includeDependency("org.jetbrains.kotlinx:kotlinx-io")
includeDependency("org.jetbrains.kotlinx:kotlinx-io-core")
includeDependency("org.jetbrains.kotlinx:kotlinx-datetime")
}
bundle("kermit") {
includeGroup("co.touchlab")
}
bundle("tinylog") {
includeGroup("org.tinylog")
}
}
}
versionCatalogUpdate {
catalogFile.set(file("config/libs.toml"))
fun ModuleVersionCandidate.newlyContains(keyword: String): Boolean {
return !currentVersion.contains(keyword, ignoreCase = true) && candidate.version.contains(keyword, ignoreCase = true)
}
versionSelector {
!it.newlyContains("alpha") &&
!it.newlyContains("beta") &&
!it.newlyContains("RC") &&
!it.newlyContains("M") &&
!it.newlyContains("eap") &&
!it.newlyContains("dev") &&
!it.newlyContains("pre")
}
}
// Always update to the ALL distribution when updating Gradle
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}