Hi, 

Consider this…

task copy(type: Copy) {
  from('content', 'images') {
    into('build/texts')
  }
}

Error:

* What went wrong:
Circular dependency between the following tasks:
:copy
\--- :copy (*)


See it? Had me stumped for a while.

The problem here is that the closure is not treated as configuration, but 
rather as a source… and the into() method returns `this`. 

This is kinda tricky to solve. There's no way to know what the user intends. 
The only thing I can think to do here is not allow a closure as the last arg on 
from(Object...). That means that if you try and do:

task copy(type: Copy) {
  into('build/texts')
  from 'content', 'images', { someLazyFileProperty }
}

You are going to get an error saying you can't do that, and you'll have to move 
the {} to a different parameter position. Kinda nasty, but better that the 
confusing behaviour we have now.

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com


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

    http://xircles.codehaus.org/manage_email


Reply via email to