mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 08:38:13 -07:00
Bug when invoking direct project:task.
This commit is contained in:
parent
410b497ec2
commit
f038139a8e
1 changed files with 6 additions and 3 deletions
|
@ -79,8 +79,10 @@ public class TaskManager @Inject constructor(val plugins: Plugins, val args: Arg
|
||||||
//
|
//
|
||||||
// If the current target is free, add it as a single node to the graph
|
// If the current target is free, add it as a single node to the graph
|
||||||
//
|
//
|
||||||
val currentFreeTask = calculateFreeTasks(tasksByNames, reverseAfter).filter {
|
val allFreeTasks = calculateFreeTasks(tasksByNames, reverseAfter)
|
||||||
it.name == target
|
val currentFreeTask = allFreeTasks.filter {
|
||||||
|
println("COMPARING ${it.name} and $target")
|
||||||
|
TaskInfo(projectName, it.name).id == target
|
||||||
}
|
}
|
||||||
if (currentFreeTask.size() == 1) {
|
if (currentFreeTask.size() == 1) {
|
||||||
currentFreeTask.get(0).let {
|
currentFreeTask.get(0).let {
|
||||||
|
@ -152,7 +154,8 @@ public class TaskManager @Inject constructor(val plugins: Plugins, val args: Arg
|
||||||
/**
|
/**
|
||||||
* Find the free tasks of the graph.
|
* Find the free tasks of the graph.
|
||||||
*/
|
*/
|
||||||
private fun calculateFreeTasks(tasksByNames: Map<String, PluginTask>, reverseAfter: HashMap<String, String>): Collection<PluginTask> {
|
private fun calculateFreeTasks(tasksByNames: Map<String, PluginTask>, reverseAfter: HashMap<String, String>)
|
||||||
|
: Collection<PluginTask> {
|
||||||
val freeTaskMap = hashMapOf<String, PluginTask>()
|
val freeTaskMap = hashMapOf<String, PluginTask>()
|
||||||
tasksByNames.keySet().forEach {
|
tasksByNames.keySet().forEach {
|
||||||
if (! runBefore.containsKey(it) && ! reverseAfter.containsKey(it)) {
|
if (! runBefore.containsKey(it) && ! reverseAfter.containsKey(it)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue