Avoid creating a circular dependency between shared subtasks.

This commit is contained in:
Dawid Weiss 2021-03-24 16:00:23 +01:00
parent 4c2de7ef43
commit 108cd85375
1 changed files with 5 additions and 2 deletions

View File

@ -47,9 +47,12 @@ configure([
queue.addAll(dep.getDependencies(t))
}
}
def intersection = visited.intersect(deps)
def tidyDeps = visited - intersection + [tidy]
def genDeps = deps - intersection
def otherDeps = deps - [tidy]
visited.each { Task t -> t.mustRunAfter(otherDeps) }
tidyDeps.each { Task t -> t.mustRunAfter(genDeps) }
}
}
}