The fileTree() method takes a configuration closure that configures the resultant FileTree. The zipTree() method does not. For consistency is should. I have a use case where that would make things slightly cleaner.
The difference is that calling fileTree()
actually returns a ConfigurableFileTree
, so it makes sense to provide a method which takes a configuration closure. The zipTree()
method on the other hand simply returns a FileTree
which is effectively immutable as its methods primarily return a new FileTree
.