[GRADLE-1610] no exception when task with the same name is added Created: 14/Jun/11 Updated: 04/Jan/13 Resolved: 22/Jun/11
|Resolution:||Not A Bug||Votes:||0|
Issue leads to very confusing behavior, see ticket:
|Comment by Szczepan Faber [ 14/Jun/11 ]|
Consider the example:
|Comment by Adam Murdoch [ 21/Jun/11 ]|
You're not adding the same task twice. The parameter to task() is interpreted as a task name, not a task path. So the call to task(':api:foo') in the root project adds a task with name ':api:foo' to the root project, ie it's adding task '::api:foo', not ':api:foo'.
Instead, task() should either fail when a path is passed to it, or should treat its parameter as a path and add the task to the appropriate project. Either way, then you'd get an exception in the above case.
|Comment by Szczepan Faber [ 22/Jun/11 ]|
We should fix