mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Limit the recursivity to 1, when searching for gradle modules.
This commit is contained in:
+3
-3
@@ -73,7 +73,7 @@ include(":services:appnavstate:impl")
|
|||||||
include(":services:toolbox:api")
|
include(":services:toolbox:api")
|
||||||
include(":services:toolbox:impl")
|
include(":services:toolbox:impl")
|
||||||
|
|
||||||
fun includeProjects(directory: File, path: String) {
|
fun includeProjects(directory: File, path: String, maxDepth: Int = 1) {
|
||||||
directory.listFiles().orEmpty().forEach { file ->
|
directory.listFiles().orEmpty().forEach { file ->
|
||||||
if (file.isDirectory) {
|
if (file.isDirectory) {
|
||||||
val newPath = "$path:${file.name}"
|
val newPath = "$path:${file.name}"
|
||||||
@@ -81,8 +81,8 @@ fun includeProjects(directory: File, path: String) {
|
|||||||
if (buildFile.exists()) {
|
if (buildFile.exists()) {
|
||||||
include(newPath)
|
include(newPath)
|
||||||
println("Included project: $newPath")
|
println("Included project: $newPath")
|
||||||
} else {
|
} else if (maxDepth > 0) {
|
||||||
includeProjects(file, newPath)
|
includeProjects(file, newPath, maxDepth - 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user