If i have a gradle multi-project like this
RootProject
+-- SubProjectA
+-- SubProjectB
and every project has a task 'foo', i can call it on the root project
RootProject>gradle foo
and it also gets executed for the subprojects
:foo
:SubProjectA:foo
:SubProjectB:foo
But if i call task ':foo' from a Subproject
RootProject\SubProjectA>gradle :foo
only the task on root project gets executed
:foo
but not the 'foo' tasks on the subprojects.
Is there a way to call 'foo' on all projects while being in a subproject? I'm asking this because i am using the gradle eclipse plug-in and there i only have access to the subprojects, i.e. the projects that i see in eclipse.
By the way: The (somewhat hacky) solution i came up with so far
task fooAll(type:Exec) {
workingDir '..'
commandLine 'cmd', '/c', 'gradle foo'
}