title: Conventional way of copying files in Gradle - use Copy task or copy method?
body: <p>I'm adding a task to deploy war files to Tomcat .. the only thing that the task needs to do is copy the war file to the TOMCAT location. </p>
  
  <p>There 2 ways that I can think of implementing this .. but being new to gradle, I'm not quite sure what's more conventional/right (or if it even matters).</p>
  
  <pre><code>task myCopy(type: Copy)
  
      myCopy.configure {
         from('source')
         into('target')
         include('*.war')
      }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>task myCopy{
    doLast{
       copy {
         from 'source'
         into 'target'
         include '*.war'
       }   
    }
  
  }
  </code></pre>