-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.gradle.kts
More file actions
36 lines (28 loc) · 878 Bytes
/
Copy pathsettings.gradle.kts
File metadata and controls
36 lines (28 loc) · 878 Bytes
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
rootProject.name = "kore"
/* A list of modules included in this mono repo */
val services = arrayOf(
"api"
)
val integrations = mapOf(
"clients" to arrayOf(
"youtube"
)
)
/* A few utility functions for registering modules from arrays */
fun registerModules(parents: List<String>, children: Map<String, Array<String>>) {
includeModule(parents)
children.forEach { (newParent, newChildren) ->
registerModules(parents + newParent, newChildren)
}
}
fun registerModules(parents: List<String>, children: Array<String>) {
includeModule(parents)
children.forEach { child ->
includeModule(parents + child)
}
}
fun includeModule(path: List<String>) {
include(path.joinToString(separator = ":"))
}
registerModules(listOf("services"), services)
registerModules(listOf("integrations"), integrations)