-
Notifications
You must be signed in to change notification settings - Fork 32
/
settings.gradle.kts
54 lines (46 loc) · 1.14 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
pluginManagement {
includeBuild("build-logic")
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://www.jitpack.io") }
}
}
rootProject.name = "LogFox"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
include(
":app",
":shared",
":strings",
)
includeRecursive(File("core"))
includeRecursive(File("feature"))
private fun includeRecursive(
directory: File,
parentDirectoriesNames: List<String> = listOf(directory.name),
) {
fun File.isModule(): Boolean = File(this, "build.gradle.kts").isFile
if (directory.isModule()) {
val moduleName = parentDirectoriesNames.joinToString(
prefix = ":",
separator = ":",
)
include(moduleName)
} else {
directory
.listFiles()
?.forEach { file ->
includeRecursive(
directory = file,
parentDirectoriesNames = parentDirectoriesNames + file.name,
)
}
}
}