On May 4, 2009, at 8:16 AM, Hans Dockter wrote:

<snip>

which defeats the purpose, I think. It also looks a lot like a call to the Project.task() method, which is confusing, I think:

Task someVar = task('anExistingTask')

The project task method is rarely used in a build script. You need it if your task names don't obey to valid Groovy variable names or if there is some shadowing going on. So why not renaming the Project.task method to Project.getTask. Then we could provide task(taskName) for the usage in statements and in a fluent API manner without causing confusion. The use cases for this are not common but also not extremely exotic. And you wouldn't have to fall back to a completely different syntax.

Why not getting rid of the Project.task method altogether? One can use the tasks.getByName method instead.

<snip>

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to