title: Create zip of the source code in gradle
body: <p>I want to create a zip of my entire code base using a gradle task. I am facing one issue to get the parentDir . I have tried using project , project.rootDir, project.rootProject, projectDir, project, sourceSets*.allSource . I am not getting any correct output. I f I use project alone, it gives me a zip containing only the subproject files. Any pointers?
   My task looks like this :</p>
  
  <pre><code>task srcZip(type:Zip){
  from project
  exclude('**/*//*.iml', '*//*build/', '*//*dist')
  exclude('*.zip')
  destinationDir file('dist')
  }
  </code></pre>