On 19/01/2011, at 10:07 AM, Sean Van Buggenum wrote:

> ahh, gotcha.
> 
> I would have expected the 'onlyIf' functionality only makes sense for
> tasks, and therefore would only be attempted to apply to tasks (and
> not to the property).

Unfortunately, there's not much we can do here. Groovy dispatches the method 
calls from left-to-right and there's no real opportunity to look ahead to see 
what methods will be called. We might be able to improve the error message, 
though, to give you some clues as to what went wrong.

One option is to get rid of the collision by moving the tasks out of the 
properties of the project, so that they are in different name spaces. This 
would basically mean that you'd configure tasks in a tasks { } section, which 
does have some appeal as far as readability and consistency goes.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

Reply via email to