Gradle task to create a zip archive of a directory
I figured out a way for this: Its working for me now. task myZip(type: Zip) { from ‘Reports/’ include ‘*’ include ‘*/*’ //to include contents of a folder present inside Reports directory archiveName ‘Reports.zip’ destinationDir(file(‘/dir1/dir2/dir3/’)) }