How to execute task with its dependencies?


(Dmitry Gusev) #1

I’m extending eclipse plugin and I need to execute my own task (that has its own dependencies) in eclipseClasspath.doLast. Here’s what I’m doing now:

eclipseClasspath << {

updateDependenciesInWebInfLib.execute() }

but updateDependenciesInWebInfLib.execute() doesn’t execute dependent tasks, so I have to execute all dependent tasks manually ATM. Is there any way I can do this ?


(Stefan Sieber) #2

Maybe this other thread can help you:

http://forums.gradle.org/gradle/topics/how_can_i_call_a_task_from_another_task_with_dependencies


(andrew.oberstar) #3

Another option for extending the eclipse plugin, is to just have your custom plugin do any additional work using the existing eclipse model objects. That way your developers can continue to execute eclipseClasspath as they normally would but still get your custom actions.

eclipse.classpath.file.whenMerged {
  ...
}
// or some other method on the model object