On 29/06/2011, at 10:47 AM, Luke Daley wrote:

> Hi,
> 
> It's not clear to me what the purpose of ConventionTask is, given that tasks 
> created by the class generator get this functionality.
> 
> Should users be extending ConventionTask or DefaultTask in their projects and 
> plugins?

ConventionTask is really just an historical thing, left over from when tasks 
were the only domain objects to have convention mappings applied to them.

ConventionTask does have one benefit over DefaultTask, in that it is declared 
as implementing IConventionAware, whereas DefaultTask just happens to 
dynamically implement IConventionAware. This makes it a bit easier to use from 
a plugin implemented in java.

But that doesn't help you with all the other types that you might want to apply 
convention mappings to. So, I think we should probably deprecate and remove it.

Longer term, it would be nice if you didn't have to extend DefaultTask, either, 
so that you can use arbitrary POJOs for task implementations.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to