2020-12-20 17:16:23 +00:00
|
|
|
include(":core")
|
2020-06-26 02:45:45 +00:00
|
|
|
|
2023-10-30 20:05:02 +00:00
|
|
|
// Load all modules under /lib
|
2024-01-22 21:19:41 +00:00
|
|
|
File(rootDir, "lib").eachDir { include("lib:${it.name}") }
|
2021-02-13 00:05:45 +00:00
|
|
|
|
2024-02-13 14:16:14 +00:00
|
|
|
// Load all modules under /lib-multisrc
|
|
|
|
File(rootDir, "lib-multisrc").eachDir { include("lib-multisrc:${it.name}") }
|
|
|
|
|
2024-01-22 21:19:41 +00:00
|
|
|
// Local development (full project build)
|
|
|
|
include(":multisrc")
|
|
|
|
project(":multisrc").projectDir = File("multisrc")
|
2021-02-13 00:05:45 +00:00
|
|
|
|
2024-01-22 21:19:41 +00:00
|
|
|
loadAllIndividualExtensions()
|
|
|
|
loadAllGeneratedMultisrcExtensions()
|
2020-12-11 14:41:48 +00:00
|
|
|
|
2023-10-30 20:05:02 +00:00
|
|
|
fun loadAllIndividualExtensions() {
|
|
|
|
File(rootDir, "src").eachDir { dir ->
|
|
|
|
dir.eachDir { subdir ->
|
|
|
|
val name = ":extensions:individual:${dir.name}:${subdir.name}"
|
|
|
|
include(name)
|
|
|
|
project(name).projectDir = File("src/${dir.name}/${subdir.name}")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-22 21:19:41 +00:00
|
|
|
|
2023-10-30 20:05:02 +00:00
|
|
|
fun loadAllGeneratedMultisrcExtensions() {
|
|
|
|
File(rootDir, "generated-src").eachDir { dir ->
|
|
|
|
dir.eachDir { subdir ->
|
|
|
|
val name = ":extensions:multisrc:${dir.name}:${subdir.name}"
|
|
|
|
include(name)
|
|
|
|
project(name).projectDir = File("generated-src/${dir.name}/${subdir.name}")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-06-05 00:55:39 +00:00
|
|
|
fun File.eachDir(block: (File) -> Unit) {
|
2024-02-13 14:16:14 +00:00
|
|
|
val files = listFiles() ?: return
|
|
|
|
for (file in files) {
|
|
|
|
if (file.isDirectory && file.name != ".gradle" && file.name != "build") {
|
|
|
|
block(file)
|
|
|
|
}
|
|
|
|
}
|
2024-01-09 03:14:00 +00:00
|
|
|
}
|