1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Fix task dependencies.

This commit is contained in:
Cedric Beust 2016-08-11 03:15:12 -08:00
parent c82f044bd3
commit c125f45eda
2 changed files with 16 additions and 4 deletions

View file

@ -148,12 +148,17 @@ abstract class BaseProjectRunner {
// runBefore and runAfter (task ordering) are only considered for explicit tasks (tasks that were
// explicitly requested by the user)
//
passedTasks.map { it.taskName }.let { taskNames ->
val passedTaskNames = passedTasks.map { it.taskName }.toSet()
passedTaskNames.let { taskNames ->
runBefore[taskName].forEach { from ->
addEdge(result, from, taskName, newToProcess, "runBefore")
if (passedTaskNames.contains(from)) {
addEdge(result, from, taskName, newToProcess, "runBefore")
}
}
runAfter[taskName].forEach { to ->
addEdge(result, to, taskName, newToProcess, "runAfter")
if (passedTaskNames.contains(to)) {
addEdge(result, to, taskName, newToProcess, "runAfter")
}
}
}
seen.add(taskName)