Quantcast

Disable a task based on boolean in extension

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Disable a task based on boolean in extension

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

I have an extension that has a boolean parameter, something like this:

myExtension {
    myTaskEnabled false
}

My plugin creates a “myTask” which should be enabled/disabled based on “myTaskEnabled” in the extension. Is it okay to use convention mapping to map task.enabled to this value, or should I do this differently?

Thanks

Lóránt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Disable a task based on boolean in extension

Rene Groeschke
Hey Lóránt,

this is the gradle dev list. It's purpose is to discuss gradle development, but not gradle usage. would you mind raising this issue at forums.gradle.org

cheers,
René


29 Aug 2014 20:47
Hi,

I have an extension that has a boolean parameter, something like this:

myExtension {
    myTaskEnabled false
}

My plugin creates a “myTask” which should be enabled/disabled based on “myTaskEnabled” in the extension. Is it okay to use convention mapping to map task.enabled to this value, or should I do this differently?

Thanks

Lóránt
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Disable a task based on boolean in extension

Luke Daley-2
In reply to this post by Lóránt Pintér-2
I’d use: myTask.onlyIf { myExtensnion.myTaskEnabled }

On 30 August 2014 at 4:47:16 am, Lóránt Pintér ([hidden email]) wrote:

Hi,

I have an extension that has a boolean parameter, something like this:

myExtension {
    myTaskEnabled false
}

My plugin creates a “myTask” which should be enabled/disabled based on “myTaskEnabled” in the extension. Is it okay to use convention mapping to map task.enabled to this value, or should I do this differently?

Thanks

Lóránt

Loading...