Project.exec() to take Action parameter

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Project.exec() to take Action parameter

Lóránt Pintér-2
Hi,

Would it be possible to add a version of Project.exec() that takes an Action instead of a Closure?

Thanks,
Lorant

Lóránt
Reply | Threaded
Open this post in threaded view
|

Re: Project.exec() to take Action parameter

Rene Groeschke
Hello Lóránt,
In the long run we want to get rid of the explicit closure parameter methods and use Actions as parameters for methods of the Gradle API. The accoding closure companion is then added dynamically. This is already done in some places, but not for all (as you noticed).

cheers,
René


25 Aug 2014 14:26
Hi,

Would it be possible to add a version of Project.exec() that takes an Action instead of a Closure?

Thanks,
Lorant

Lóránt
Reply | Threaded
Open this post in threaded view
|

Re: Project.exec() to take Action parameter

Lóránt Pintér
Sounds like a good direction. Can we have some goodness in the short run too, like adding this single overload?

Lóránt


On Mon, Aug 25, 2014 at 11:15 PM, Rene Groeschke <[hidden email]> wrote:

Hello Lóránt,
In the long run we want to get rid of the explicit closure parameter methods and use Actions as parameters for methods of the Gradle API. The accoding closure companion is then added dynamically. This is already done in some places, but not for all (as you noticed).

cheers,
René


<postbox-contact.jpg>
25 Aug 2014 14:26
Hi,

Would it be possible to add a version of Project.exec() that takes an Action instead of a Closure?

Thanks,
Lorant

Lóránt

Reply | Threaded
Open this post in threaded view
|

Re: Project.exec() to take Action parameter

Luke Daley-2
We should add it.

A pull request would be the quickest way to make this happen :)

On 26 August 2014 at 8:41:19 am, Lóránt Pintér ([hidden email]) wrote:

Sounds like a good direction. Can we have some goodness in the short run too, like adding this single overload?

Lóránt


On Mon, Aug 25, 2014 at 11:15 PM, Rene Groeschke <[hidden email]> wrote:

Hello Lóránt,
In the long run we want to get rid of the explicit closure parameter methods and use Actions as parameters for methods of the Gradle API. The accoding closure companion is then added dynamically. This is already done in some places, but not for all (as you noticed).

cheers,
René


<postbox-contact.jpg>
25 Aug 2014 14:26
Hi,

Would it be possible to add a version of Project.exec() that takes an Action instead of a Closure?

Thanks,
Lorant

Lóránt