Skip to content
Advertisement

change ant.zip() output directory

I want to store output of ant.zip() inside build directory. I’m doing it the following way for now.

ant.zip(destfile: sourceDirectory.name + ".zip") {
    fileset(dir: sourceDirectory.path)
}

ant.move(todir: "$project.buildDir" + "/zip") {
    fileset(dir: "$project.projectDir", includes: "*.zip")
}

Is there way to directly do it in ant.zip()?

Advertisement

Answer

Like this:

ant.zip(destfile: "$project.buildDir" + "/zip/" + sourceDirectory.name + ".zip") {
    fileset(dir: sourceDirectory.path)
}
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement