title: gradle task to zip multiple directories independently
body: <p>I am trying to create a task that looks inside a folder and zips all the folders within that folder to some output folder.</p>
  
  <p><strong>Initial state:</strong></p>
  
  <pre><code>Folder1
      -&gt; project1
          -&gt;code //some more files within project1
      -&gt; project2
          -&gt;code
  </code></pre>
  
  <p><strong>Target state:</strong></p>
  
  <pre><code>Destination
      project1.zip
      project2.zip
  </code></pre>
  
  <p>I tried using the below code, but it is zipping all the content within the folder1</p>
  
  <pre><code>task myZip(type: Zip) {
     from 'Folder1'   
     archiveName 'Compress.zip'
     destinationDir file('build')
  }
  </code></pre>
  
  <p>I probably might need to use some collections which contains the project1 and project2 info and iteratively zip to the destination folder. Having issues with this approach.</p>