I was told this has to be checked before the taskGraph is ready....
so only the string params are available when this code is executed.

This is probably the best we can do other than groovy-ifying it a bit.

On Wed, May 25, 2011 at 2:49 PM, Rene Groeschke <[email protected]> wrote:
> Hi Phil,
> well can you tell us what you try to achieve? Maybe there is a more elegant
> way to achieve your goals.
> The problem with your snippet below is, that it checks your params only.
> What if the task is in your execution graph (DAG) but not explicit called
> via start parameter.
>
> You can check the calculated task graph by:
> -------
> gradle.taskGraph.whenReady {taskGraph ->
>    if(taskGraph.hasTask(":cleanCacheLocal")
> }
> -------
>
> regards,
> René
>
> Am 25.05.11 22:14, schrieb phil swenson:
>>
>> this seems ugly to me:
>>
>> def tasksToExecute = gradle.startParameter.getTaskNames()
>> def isCleanLocalCachePresent =
>> tasksToExecute.contains('cleanCacheLocal') ||
>> tasksToExecute.contains('cCL') || tasksToExecute.contains("CCL")
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>
>
> --
> -----------------------
> regards René
>
> rene groeschke
> http://www.breskeby.com
> @breskeby
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to