Friday 15 March 2013

Is there an appropriate way to model "execute after" but not "depends on" for a Gradle task? -


I'm not sure this is possible, but I want to be able to do something like this:

  Tasks myTask (executeAfter: myOtherTask) & lt; & Lt; {// do something}   

Where my task will wait before completing my other tasks, but if my author task is not clearly designated during the build script allocation If it was done, it would not be executed as a dependency on my task (as it depends, due to this happens).

I had the idea of ​​using this linking, although I'm not sure that it can actually be implemented in this way in Gradal's lifecycle. Task.metaClass.executeAfter = {Dependency Task -> If (& lt; some condition & gt;) {this.dependsOn (Dependency Task)}}

It seems that the bridge is not available yet.

No comments:

Post a Comment