title: how to download external files in gradle?
body: <p>I have a gradle project which requires some data files available somewhere on the internet using http. The goal is that this immutable remote file is pulled once upon first build. Subsequent build should not download again.</p>
  
  <p>How can I instruct gradle to fetch the given file to a local directory?</p>
  
  <p>I've tried </p>
  
  <pre><code>task fetch(type:Copy) {
     from 'http://&lt;myurl&gt;'
     into 'data'
  }
  </code></pre>
  
  <p>but it seems that copy task type cannot deal with http.</p>
  
  <p>Bonus question: is there a way to resume a previously aborted/interrupted download just like <code>wget -c</code> does?</p>