mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Fix task ordering bug.
Fixes https://github.com/cbeust/kobalt/issues/276
This commit is contained in:
parent
1ec704e297
commit
4a1fbf2f9c
2 changed files with 22 additions and 4 deletions
|
@ -274,6 +274,17 @@ class TaskManager @Inject constructor(val args: Args,
|
|||
val newToProcess = arrayListOf<T>()
|
||||
val seen = hashSetOf<String>()
|
||||
|
||||
|
||||
// Make each task depend on the previous one, so that command line tasks are executed in the
|
||||
// order the user specified them
|
||||
passedTasks.zip(passedTasks.drop(1)).forEach { pair ->
|
||||
nodeMap[pair.first.taskName].forEach { first ->
|
||||
nodeMap[pair.second.taskName].forEach { second ->
|
||||
result.addEdge(second, first)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Reverse the always map so that tasks can be looked up.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue