2015-08-28 45 views

回答

2

是你在找什麼:

from configurations.compile.collect { 
    println it 
    zipTree(it) 
} 

+0

你能解釋一下爲什麼從configurations.compile.collect { 的println它 zipTree(它) }工作,但不能從configurations.compile.collect { zipTree(它) 的println它 } –

+2

是,在常規返回方法/閉包的最後一個語句。 'println'什麼也不返回('void'),如果你改變順序,什麼都不會返回,因此方法失敗。如果問題解決了,請接受。 – Opal