From 8e52d3ccb6b130a246d06513d737c6dfdaa98e84 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Wed, 4 May 2016 21:22:33 -0800 Subject: [PATCH] Comment. --- .../main/kotlin/com/beust/kobalt/internal/TaskManager.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/TaskManager.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/TaskManager.kt index cd1fc74c..8f902b7c 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/TaskManager.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/internal/TaskManager.kt @@ -187,9 +187,12 @@ class TaskManager @Inject constructor(val args: Args, if (!nodeMap.keys().contains(it.taskName)) { throw KobaltException("Unknown task: $it") } - it.matches(projectName) - } + it.matches(projectName) + } + // The nodes we need to process, initialized with the set of tasks requested by the user. + // As we run the graph and discover dependencies, new nodes get added to @param[newToProcess]. At + // the end of the loop, @param[toProcess] is cleared and all the new nodes get added to it. Then we loop. val toProcess = ArrayList(taskInfos) while (toProcess.size > 0) {