I have a simple multi-module project, with a root project and a number of child projects.
The root project has a distributionTar task. All the children have a task called "prepForDistributionTar". I somehow want to declare that root's distributionTask should depend on running prepForDistributionTar on all the children. *If* root had a task called "prepForDistributionTar", this would be fairly trivial. Just use dependsOnChildren. But since it doesn't...there doesn't seem to be a declarative way to do this. Workarounds seem to be: 1. Create a "prepForDistributionTar" task on root that does nothing + dependsOnChildren 2. Add calling prepForDistributionTar on subprojects to the root's task (so manually execute this task, instead of relying on the dependsOn mechanism). 3. Use GradleBuild to execute prepForDistributionTar from the root folder as if I were running it on the commandline. Seems like maybe there's an addition functionality that would be useful here. A way to declare a dependency on child tasks even when that task doesn't exist in the parent. And there were a way to declare this in the task, it's a more granular solution than dependsOnChildren, which wires up dependencies on all tasks of the same name. Maybe that's too coarse in some situations. Or maybe this use case is exactly what GradleBuild is for? -- View this message in context: http://gradle.1045684.n5.nabble.com/Dependencies-on-child-projects-when-root-project-doesn-t-have-the-same-tasks-tp3408123p3408123.html Sent from the gradle-user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
