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.

In this case (a Test task), I would like the isNeeded method to return true if either compile or compileTests didWork() is true or if any of the tasks needed to build artifacts in the testRuntime configuration didWork() was true. Currently it does not check the tasks that might be derived from the configuration.

I was hoping that a general purpose isNeeded helper could do this for all tasks in the same way, but it is possible that certain subclasses of Task just need their own specific implementations.
--
Steve Appling
Automated Logic Research Team

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

   http://xircles.codehaus.org/manage_email


Reply via email to