On 28/07/2012, at 2:57 AM, k4rn4k <[email protected]> wrote:
> It is possible to retrieve the main task which started gradle ?
>
> This is for example, if I start gradle like this "gradle compileJava"
> It is possible from the build.gradle file in configuration time to get the
> task name called in the command line ? compileJava in this case or a list if
> they were more.
>
> I want to use this to configure the task graph adding some password request
> and validations only when the task release is called. Would be something
> like "tasks.compileJava dependsOn requestPassword" but only in releases.
>
> I can check if release task is in the graph like this "taskgraph.whenReady{}
> but adding task dependencies after that point does not have effect.
>
> As workaround for now I'm using an additional argument and checking in
> config time if a property with the argument name exists.
Check gradle.startParameter.taskNames
>
> Thanks
>
>
>
> --
> View this message in context:
> http://gradle.1045684.n5.nabble.com/How-do-i-get-the-task-s-gradle-was-started-with-tp5709971.html
> Sent from the gradle-user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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