title: Gradle task that depends on a failure
body: <p>Can a gradle task depend on the failure of another task?</p>
  
  <p>For example, I have an auxillary task that opens the test report in a browser.  I want the report to only appear when the task "test" fails, not when all tests pass as it does now.</p>
  
  <pre><code>task viewTestReport(dependsOn: 'test') &lt;&lt; {
      def testReport = project.testReportDir.toString() + "/index.html"
      "powershell ii \"$testReport\"".execute()
  }
  </code></pre>