-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsettings.gradle.kts
142 lines (124 loc) · 5.47 KB
/
settings.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
rootProject.name = "LayoutOverlay"
enableFeaturePreview("VERSION_CATALOGS")
// Set single lock file (gradle.lockfile)
// This preview feature should be enabled by default in Gradle 7
// More: https://docs.gradle.org/current/userguide/dependency_locking.html#single_lock_file_per_project
// enableFeaturePreview("ONE_LOCKFILE_PER_PROJECT")
include(
":app",
":feature:service",
":feature:home",
":feature:overlay",
":feature:calculator",
":feature:settings",
":shared"
)
// Sharing dependency versions
// Plugin versions are in gradle.properties
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
plugins {
val agpVersion: String by settings
id("com.android.application") version "7.1.0-alpha13"
id("com.android.library") version "7.1.0-alpha13"
val kotlinVersion: String by settings
id("org.jetbrains.kotlin.android") version "1.6.0-M1"
id("org.jetbrains.kotlin.kapt") version kotlinVersion
id("org.jetbrains.kotlin.plugin.parcelize") version kotlinVersion
val androidJUnit5Version: String by settings
id("de.mannodermaus.android-junit5") version androidJUnit5Version
val hiltVersion: String by settings
id("dagger.hilt.android.plugin") version hiltVersion
val ktlintGradleVersion: String by settings
id("org.jlleitschuh.gradle.ktlint") version ktlintGradleVersion
}
resolutionStrategy {
eachPlugin {
when (requested.id.id) {
"com.android.application",
"com.android.library" -> {
val agpCoordinates: String by settings
useModule(agpCoordinates)
}
"androidx.navigation.safeargs.kotlin" -> {
val navigationCoordinates: String by settings
useModule(navigationCoordinates)
}
"de.mannodermaus.android-junit5" -> {
val androidJnit5Coordinates: String by settings
useModule(androidJnit5Coordinates)
}
"dagger.hilt.android.plugin" -> {
val hiltCoordinates: String by settings
useModule(hiltCoordinates)
}
}
}
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
}
versionCatalogs {
create("libs") {
alias("core-ktx").to("androidx.core:core-ktx:1.+")
alias("fragment-ktx").to("androidx.fragment:fragment-ktx:1.+")
bundle("ktx", listOf("core-ktx", "fragment-ktx"))
alias("appcompat").to("androidx.appcompat:appcompat:1.+")
alias("material").to("com.google.android.material:material:1.+")
alias("constraintLayout").to("androidx.constraintlayout:constraintlayout:2.+")
alias("lifecycle").to("androidx.lifecycle:lifecycle-common-java8:2.+")
alias("cardview").to("androidx.cardview:cardview:1.+")
alias("lottie").to("com.airbnb.android:lottie:2.+")
alias("preference").to("androidx.preference:preference-ktx:1.+")
val hiltVersion: String by settings
version("hilt", hiltVersion)
alias("hilt").to("com.google.dagger", "hilt-android").versionRef("hilt")
alias("hilt.compiler").to("com.google.dagger", "hilt-android-compiler").versionRef("hilt")
val navigationVersion: String by settings
version("navigation", navigationVersion)
alias("navigation-fragment").to("androidx.navigation", "navigation-fragment-ktx").versionRef("navigation")
alias("navigation-ui-ktx").to("androidx.navigation", "navigation-ui-ktx").versionRef("navigation")
bundle("navigation", listOf("navigation-fragment", "navigation-ui-ktx"))
version("room", "2.+")
alias("room-ktx").to("androidx.room", "room-ktx").versionRef("room")
alias("room-runtime").to("androidx.room", "room-runtime").versionRef("room")
bundle("room", listOf("room-ktx", "room-runtime"))
alias("room.compiler").to("androidx.room", "room-compiler").versionRef("room")
alias("test-runner").to("androidx.test:runner:1.+")
alias("test-rules").to("androidx.test:rules:1.+")
alias("hamcrest").to("org.hamcrest:hamcrest-library:1.+")
alias("espresso").to("androidx.test.espresso:espresso-core:3.+")
alias("uiautomator").to("androidx.test.uiautomator:uiautomator:2.+")
alias("junit5-test-core").to("de.mannodermaus.junit5:android-test-core:1.+")
alias("junit5-test-runner").to("de.mannodermaus.junit5:android-test-runner:1.+")
version("junit", "5.+")
alias("junit-jupiter-api").to("org.junit.jupiter", "junit-jupiter-api").versionRef("junit")
alias("junit-jupiter-engine").to("org.junit.jupiter", "junit-jupiter-engine").versionRef("junit")
bundle(
"test",
listOf(
"test-runner",
"junit-jupiter-api",
"junit5-test-core"
)
)
bundle(
"androidTest",
listOf(
"test-runner",
"test-rules",
"hamcrest",
"espresso",
"uiautomator"
)
)
}
}
}