Hans Dockter wrote:
Hi Adam,
On Jul 16, 2008, at 12:32 AM, Adam Murdoch wrote:
More specifically, when a name is provided on the command-line, if it
starts with ':', it is treated as a task path, and the task with that
path is executed (along with its dependencies). Otherwise, it is
treated as it is currently, where all tasks with the given name are
executed (with dependencies).
Would it make sense to add this behaviour to gradle?
That would make a lot of sense. In fact, as soon as we support
arbitrary multi-project layouts this is even required. Right now the
only way to achieve what you want (i.e. partial build) is to go to the
subproject folder and execute the build from there. This works only
because we assume a hierarchical layout and are able to find the root
by looking for a settings.gradle file. As soon as we can't make any
assumptions about the layout, you either have to specify the root when
you are in the subproject or the subproject, if you are in the root.
The latter is what you want.
In the case where a path is provided on the command-line, should we
search for the task in the current project (and its sub-projects) or the
root project (and its sub-projects)?
ie in the water sample, if I am in the krill sub-directory, should I be
able to run gradle :bluewhale:hello? Or just :krill:hello?
Searching in the current project would be consistent with the case where
a name is provided. Searching in the root project would be consistent
with the behaviour of task dependsOn, and possibly a better fit for
arbitrary multi-project layouts as we don't need to know what the
current project is.
Adam
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email