how to return from task and mark task as being 'up-to-date'

Viewed 1545

I would like to programmatically tell gradle to return from a task, for example:

task ('SetupLibs') << {

    if (sometest)
       // how to tell gradle to return from this task 
       // because it is up-to-date 

    ...
}

Is this possible in groovy? how?

2 Answers
Related