title: Difference between doLast and leftShift on Gradle task?
body: <p>I am aware of the difference between passing in a configuration closure and defining an action for a task. I believe you can't use <code>&lt;&lt;</code> in a configuration closure because it seems like a syntax error:</p>
  
  <pre><code>task wrong {
    &lt;&lt; { println "From doLast" }
  }
  </code></pre>
  
  <p>But. Why can't I use <code>leftShift</code> as an equivalent of <code>&lt;&lt;</code> in the above configuration closure? In an even more clear test case, why doesn't the following buildfile output the line <code>From leftShift - inside</code>?</p>
  
  <pre><code>defaultTasks 'tryout'
  
  task tryout {
    doLast { println "From doLast" }
    leftShift { println "From leftShift - inside" }
  }
  
  tryout.leftShift { println "From leftShift - outside" }
  </code></pre>
  
  <p>Of course, this is not a real problem, as I can simply use doLast. I'm just trying to broaden my understanding of Gradle. Thanks!</p>