I have a gradle task to create a zip archive of a directory. The gradle task is:
task archiveReports(type: Zip) { from \'/projects/Reports/*\' archiveN
Adding to the accepted answer, with Gradle 6.7,
task packageDistribution(type: Zip) { archiveFileName = "my-distribution.zip" destinationDirectory = file("$buildDir/dist") from "$buildDir/toArchive" }
archiveName is deprected.