On 08/02/2012, at 10:21 PM, Adam Murdoch wrote:

> On 09/02/2012, at 4:22 AM, Luke Daley wrote:
> 
>> I think we should add:
>> 
>> void add(String name, Class<?> type, Object... constructionArguments)
>> 
>> To ExtensionContainer, a quick look says this isn't too much work and it 
>> makes extensions much better for users.
>> 
>> Anyone opposed?
> 
> Sounds good. Do we want any groovy sugar? eg project.extensions.myPlugin = 
> MyPluginExtensionType

Unsure, because the syntax has to support construction args. 

So it would probably be…

extensions.myPlugin(MyPluginExtensionType, project)

I don't mind it, but I wonder if it's going too far. Alternative would be:

extensions.add("myPlugin", MyPluginExtensionType, project)

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com

Reply via email to