In case my example sounds confusing: MavenPlugin#configureInstall is an example 
of a plugin that would have to be changed to first configure the task and to 
then add the task afterwards.


Begin forwarded message:

> From: Etienne Studer (practicalgradle.org) <[email protected]>
> Subject: Fwd: [gradle-dev] Configuring tasks before they are added to the 
> task container.
> Date: 6. Oktober 2011 11:15:03 MESZ
> To: dev <[email protected]>
> 
> In case my example sounds confusing: MavenPlugin#configureInstall is an 
> example of a plugin that would have to be changed to first configure the task 
> and to then add the task afterwards.
> 
> Begin forwarded message:
> 
>> From: "Etienne Studer (practicalgradle.org)" <[email protected]>
>> Subject: Re: [gradle-dev] Configuring tasks before they are added to the 
>> task container.
>> Date: 6. Oktober 2011 11:11:35 MESZ
>> To: [email protected]
>> 
>> I ran into the same issue. I think it would be great if the tasks were 
>> configured by the time they are available to a call-back.
>> 
>> I believe this also means that when plugins add tasks, they should do that 
>> as the last step, i.e. after having configured the task. For example, see 
>> MavenPlugin#configureInstall where the task is first added and then 
>> configured.
>> 
>> Regards, Etienne
>> 
>> 
>> 
>> On 06.10.2011, at 11:04, Luke Daley wrote:
>> 
>>> This came up (kinda) on the forum recently: http://gsfn.us/t/2gmv8
>>> 
>>> The proposition is that when adding a task with a configuration closure, 
>>> the configuration should be applied before the task is added to the 
>>> container. This would mean that any callbacks registered on the container 
>>> would get the configured task. I can see that this would be a good thing 
>>> and would be trivial to make happen.
>>> 
>>> Can anyone think of a reason not to do this?
>>> 
>>> -- 
>>> Luke Daley
>>> Principal Engineer, Gradleware 
>>> http://gradleware.com
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>> 
>>>   http://xircles.codehaus.org/manage_email
>>> 
>>> 
>> 
> 

Reply via email to