This is not possible by default, but you can move all the files that will be included in the final zip and change the destination path in that zip, like:
distZip { eachFile { file -> String path = file.relativePath file.setPath(path.substring(path.indexOf("/")+1,path.length())) } }
An additional configuration of the distZip task has been distZip , which changes each file destination path in the final zip archive, removing the root folder from it. In your case, it will remove the MyApp folder from the zip code.
source share