I want to extract some cans from the war as part of my gradle (2.0) build. So far I have this:
task unzip(type: Copy) { def zipFile = file('D:/external/dependent.war') def outputDir = file('lib') from zipTree(zipFile) into outputDir include 'WEB-INF/lib/*.jar' }
This puts the WEB-INF / lib directory in outputDir. I just want the cans to be flat.
To do this in Ant, I would do the following:
<target name="unzip"> <unzip src="D:/external/dependent.war" dest="lib"> <patternset> <include name="WEB-INF/lib/*.jar"/> </patternset> <mapper type="flatten"/> </unzip> </target>
How to do it in gradle?
gradle
opticyclic
source share