Gradle Maven build plugin replacement
I am new to Gradle and am trying to port an existing Maven pom.xml that makes extensive use of the maven-assembly-plugin to generate various zip files.
In the example below, I get files from different subdirectories (with specific extensions) and then map them in a flat structure to a ZIP file.
task batchZip(type: Zip) {
from fileTree('src/main/sas') {
include('**/*.sas')
include('**/*.ds')
}.files
}
This puts all files in the zip root. However, ideally, I want the files to be under a specific path in the zip root, e.g. / Shared / SAS.
Is there a way to do this without copying all the files to a local directory and then zipping it?
+3
source to share