Phil Messenger wrote:
Hi,
I'm busy cleaning up some plugins we're using internally and have hit
another interesting problem. I've got a "release" task, which depends on the
execution of a "deploy" task AFTER the release task has finished executing.
Just to check I understand it: 'deploy' must execute after 'release' if
'release' happens to be in the dag, but 'deploy' can also be executed if
'release' is not included in the dag. ie, 'deploy' does not dependOn
'release'
Does 'deploy' always execute if 'release' is in the dag?
If so, then this type of dependency is pretty much the same as the
finally tasks we discussed for reporting (but haven't got around to
implementing yet)
ie if we have
release doFinally deploy
then
gradle release -> execute release, deploy
gradle deploy -> execute deploy
If not, then this feels like an optional dependency, a concept we don't
have yet.
Something like if we have
deploy optionalDependsOn release
releaseBuild dependsOn release, deploy
then
gradle release -> execute release
gradle deploy -> execute deploy
gradle releaseBuild -> execute release, deploy, releaseBuild
At the moment I'm doing something hideous to enforce this dependency - doing
a check at runtime to see if the "deploy" task is in the task dag. The net
effect of this is loads of "if(shouldExecute(project))" calls scattered
around my plugins.
So is there an easy or better way of depending on the future execution of
another task?
Not yet
Or should I open a JIRA issue?
Yes
Adam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email