Eric Berry wrote:
> 
> Is the '<<' the correct way to do this, so I should change all the Delete
> tasks over to use it?
> 

The correct way is to use one of

task foo << {
  delete "bar" // Project.delete
}

and

task foo(type: Delete) {
  delete "bar" // Delete.delete
}

A possible explanation why the latter doesn't work for you is that the
delete() call inside the eachFile() closure is mistakenly resolved to
Project.delete(). In this case you should be able to work around the problem
by making the task closure accept a "task" argument and using
"task.delete()" inside eachFile().

--
Peter Niederwieser
Principal Engineer, Gradleware 
http://gradleware.com
Creator, Spock Framework 
http://spockframework.org
Blog: http://pniederw.wordpress.com
Twitter: @pniederw


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/RFC-Weird-configuration-vs-execution-phase-issue-tp4463377p4466363.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


Reply via email to