gradle task to zip multiple directories independently
问题 I am trying to create a task that looks inside a folder and zips all the folders within that folder to some output folder. Initial state: Folder1 -> project1 ->code //some more files within project1 -> project2 ->code Target state: Destination project1.zip project2.zip I tried using the below code, but it is zipping all the content within the folder1 task myZip(type: Zip) { from 'Folder1' archiveName 'Compress.zip' destinationDir file('build') } I probably might need to use some collections