title: Gradle: task's standardOutput to file and terminal simultaneously
body: <p>I want to change <code>standardOutput</code> of one build task to file, because it will be parsed later by another task.</p>
  
  <p>But also, I would like to have simultaneously output in the terminal to see what's going on in the build.</p>
  
  <p>This is how I changed output of the task to the file:</p>
  
  <pre><code>task sampleTaskWithOutputToFile(type: Exec) {
      commandLine 'someCommand', 'param1'
  
      doFirst {
          standardOutput = new FileOutputStream('someFolder/someFile.out')
      }
  } 
  </code></pre>
  
  <p>As I understand, I can write own <code>OutputStream</code> implementation with output to file and standard <code>System.out</code> simultaneously <strong>but I would like to use existing solution</strong>.</p>
  
  <p>Also, I can not use unix tools like <code>tee</code> for that, because task can be launched from any OS (Mac OS, Some Linux or even Windows...)</p>
  
  <p><strong>Thanks!</strong></p>