Steve Appling wrote:


Hans Dockter wrote:
<snip>

4) I would like to be able to specify that a chain of dependent tasks only execute a task if Task.didWork is true for all of its dependents.

I don't fully understand this. Could you explain this a bit more?

<snip>

- Hans


Sure - I did not express that very well at all. I also wrote it before I attempted an implementation, so I think I have a better idea of what might be needed now.

In the syntax that I implemented, you could say:
test.onlyIf { isNeeded() }

I wanted this to be able to look at the TaskDependencies for the test task and only execute if Task.didWork was true for one of them. I was not able to figure out how to use TaskDependencies to accomplish this. task.getTaskDependencies(task) only returns the tasks that are explicitly added using dependsOn and doesn't seem to take into account the tasks needed to build the artifacts in the configurations that are contained in the TaskDependencies object.


It should return both types of tasks. However, it will only start doing this once all the projects have been evaluated, which is fine for implementing isNeeded()


Adam


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to