Gradle: Zipping files

If you put

    apply plugin:'java'

at the top of your build.gradle file you can run 'gradle zip' with the following:

	task zip(type: Zip) {
	    archiveName = "ItsName.zip"
	    from projectDir
	    include 'somedir/**/*'
	    include 'filefile.txt'
	    include '*.others'
	}

Your zip will be available at build/distributions/.

gradle gradle-zip

Edit on github
comments powered by Disqus
Click me