How do you give a task rule another task as a dependency (either a specific task generated by the rule or for all of the tasks generated by the rule)?
I am using the Grails plugin and it defines all of it’s tasks via a task rule. I have a task that I use to generate a database config file. I would like it to run before that task to start the Grails app.
That only seems to work for explicitly defined tasks. I can’t get it to work for for tasks defined as a task rule. For instance if I try the following (I use “tasks[‘grails-run-app’]” because ‘grails-run-app’ is not a valid groovy identifier):
I worked out a solution to this problem. Basically I have to add a listener for when the tasks are created by the rule. So I have to do something like:
There’s a bug in version 1.1 that prevents this from working as it should. The workaround you have in place is the only way I can see to solve this unfortunately.