title: Gradle - Delete not working
body: <p>I want to append some extra delete functionality to the clean task (for Java builds).</p>
  
  <p>So I try adding the following to my gradle build script.</p>
  
  <pre><code>clean.doLast{
      delete ('test.txt')
  }
  </code></pre>
  
  <p>When I tun the "clean" task my sample file doesn't get deleted ... I also don't get any error message indicated what happened.</p>
  
  <p>If I try the following:</p>
  
  <pre><code>task deleteStuff(type: Delete) {
      delete 'test.txt'
  }
  </code></pre>
  
  <p>Things do work. </p>
  
  <p>Can I not add (via doLast) delete functionality to tasks? What is the proper way of doing this (without hacking in Ant tasks).</p>