From 1013e73ff81600f0ad5f6383ca1604b0f256445d Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 28 Mar 2023 14:51:30 +0200 Subject: [PATCH] Limit the recursivity to 1, when searching for gradle modules. --- settings.gradle.kts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 2a491a2743..8abb803f94 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -73,7 +73,7 @@ include(":services:appnavstate:impl") include(":services:toolbox:api") include(":services:toolbox:impl") -fun includeProjects(directory: File, path: String) { +fun includeProjects(directory: File, path: String, maxDepth: Int = 1) { directory.listFiles().orEmpty().forEach { file -> if (file.isDirectory) { val newPath = "$path:${file.name}" @@ -81,8 +81,8 @@ fun includeProjects(directory: File, path: String) { if (buildFile.exists()) { include(newPath) println("Included project: $newPath") - } else { - includeProjects(file, newPath) + } else if (maxDepth > 0) { + includeProjects(file, newPath, maxDepth - 1) } } }