title: gradle tar task not executed
body: <p>I am writing a Gradle build for a non-java project for assembling existing directories and tar archives into a .tar.gz The tar task skips if I use the definition like so:</p>
  
  <pre><code>task archive(dependsOn: 'initArchive',type: Tar) &lt;&lt; {
      baseName = project.Name
      destinationDir = new File(project.buildDir.path+'/installer')
      compression = Compression.GZIP
      from (archiveDir)
      doLast{
          checksum(archivePath)
      }
  }
  </code></pre>
  
  <p>here's the console output</p>
  
  <pre><code>:jenkins-maven-sonar:archive
  Skipping task ':jenkins-maven-sonar:archive' as it has no source files.
  :jenkins-maven-sonar:archive UP-TO-DATE
  
  BUILD SUCCESSFUL
  
  Total time: 9.056 secs
  </code></pre>
  
  <p>When I try to use tar task as a method it fails complaining cannot find method</p>
  
  <pre><code>task archive(dependsOn: 'initArchive') &lt;&lt; {
      tar{
      baseName = project.Name
      destinationDir = new File(project.buildDir.path+'/installer')
      compression = Compression.GZIP
      from (archiveDir)
      doLast{
          checksum(archivePath)
      }
      }
  }
  
  FAILURE: Build failed with an exception.
  
  * Where:
  Build file '/home/anadi/Code/da-ci-installers/build.gradle' line: 29
  
  * What went wrong:
  Execution failed for task ':jenkins-maven-sonar:archive'.
  &gt; Could not find method tar() for arguments [build_6a2bckppv2tk8qodr6lkg5tqft$_run_closure3_closure5_closure7@4a5f634c] on task ':jenkins-maven-sonar:archive'.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
  
  BUILD FAILED
  
  Total time: 8.749 secs
  </code></pre>
  
  <p>Can we run the tar task in same way as Gradle allows running copy? In the same build I have a block like follows and I want to know if tar can used in the same way</p>
  
  <pre><code>            copy {
                  project.logger.info("Copying bundle :: "+bundle[x])
                  from(rootProject.projectDir.path+"/3rd-party-tools/"+bundle[x]) {
                      include '**/*.*'
                  }
                  into(archiveDir)
             }
  </code></pre>
  
  <p>if not how to make sure my build does not "skip tar" task if using the first form described above.</p>