title: Gradle distribution plugin
body: <p>I have to create zip, tar.gz and tar.bz2 and include src, build.gradle and exclude .* files..</p>
  <pre><code>    &lt;format&gt;zip&lt;/format&gt;
      &lt;format&gt;tar.gz&lt;/format&gt;
      &lt;format&gt;tar.bz2&lt;/format&gt;
  </code></pre>
  <p>so I have created below distribution in build.gradle but this will create sample.zip and sample.tar.
  **how to create tar.gz and tar.bz2 using distribution plugin **</p>
  <pre><code>distributions {
  main {
  baseName = 'Sample'
  contents {
  from { '.' }
  exclude &quot;build&quot;
  exclude &quot;.*&quot;
  exclude &quot;target&quot;
  
          }
      }
      }
  </code></pre>
  <p>Thanks.</p>