Resolving of task names (e.g. foo
) to tasks is a function of the start directory, which defaults to the current directory. You can change the start directory with the -p
command line option (see gradle --help
). So you'd have to do something like gradle foo -p ../
.
Also importing the root project might be a better way to solve your Eclipse problem. The Eclipse tooling handles hierarchical directory layouts very well.
PS: :foo
is a task path. It refers to the task named foo
in the root project (:
).