how to put folder into a tar file with gradle
<p>I am new to gradle. 
I want to create a filename.tar file which includes (filename.war and data/config/*.properties). The war file stays inside build/libs. The requirement is: inside tar file, we need to have folder data/config and all properties files under that folder. The war file stays in the same level with data folder.</p>

<p>Here is what i have, </p>

<pre><code>task tarz(type: Tar) {
 archiveName = 'filename'
 from 'build/libs','data/config'
 include '*.war','*.properties'
 destinationDir = file('build/tar')
 extension 'tar'
 compression = Compression.GZIP
}
</code></pre>

<p>this above script is only copy properties files into tar, not the folder.
And the name of the file is 'filename', not 'filename.tar'</p>

<p>Please help me.</p>