title: How do you execute a built in gradle task in a doFirst/doLast closure?
body: <p>I don't know if I'm not doing this right or if i have to handle builtin gradle tasks differently but i have a test task that i defined like this</p>
  
  <pre><code>task testNGTests(type: Test) {
       useTestNG()
  }
  </code></pre>
  
  <p>and am trying to use it in a doFirst closure like this</p>
  
  <pre><code>task taskA {
    doFirst {
          testNGTests.execute()
     }
  }
  </code></pre>
  
  <p>but it does not work for some reason, i have also tried </p>
  
  <pre><code>testNGTests.executeTests() 
  </code></pre>
  
  <p>but that did not work either. Is there a special way that I have to handle the built in test task?</p>
  
  <p>I am using gradle version 0.9.2</p>