On Fri, Mar 11, 2011 at 1:21 PM, Leo Mekenkamp <[email protected]>wrote:
>
>
> task blah(type: Zip) << {
> configurations.zipFile.find {
> // add to and remove stuff from zip file
> }
> }
>
>
I use something similar, but to ensure that I only parse correct files,
using something like this in my custom task:
configurations.myZip.findAll{it.name.endsWith('.zip')}.each {
// it = the zip file. If custom configuration adds additional files, only
.zip extensions will be processed.
// use it.name.contains or it.name == "" for other match patterns.
}
This means you can have more than just the zip file in the dependency list
if you wanted.
>
> It works but it feels a bit crooked because this solution depends on the
> zip file being the only file in the zipFile configuration and creating a
> configuration to get just a single file seems a bit heavy. Is there a better
> way to download the zip from a repository?
>
> cheers,
> --L
>