title: Groovy: How to replace leftShift operator in these cases?
body: <p>I have the next call to a plugin in my <code>build.gradle</code>:</p>
  
  <pre><code>apply plugin: 'com.company.gradleplugins.plugin'
  </code></pre>
  
  <p>When I compile, Jenkins is warning me about Gradle 5.0 and its deprecations:</p>
  
  <blockquote>
    <p>The Task.leftShift(Closure) method has been deprecated and is
    scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action)
    instead.  </p>
    
    <p>at build_c4218hywg.run(/Users/user/Documents/project/projectfolder/app/build.gradle:12)</p>
  </blockquote>
  
  <p>The standard replace is clear (using <code>doLast</code> instead <code>&lt;&lt;</code>), but I've found some operations which I don't know how to update (the whole project is not only mine).</p>
  
  <p>So, in the plugin, I have some of these:</p>
  
  <pre><code>configJSON = mainProperties.getConfig() &lt;&lt; buildProperties.getConfig()
  
  imageNames &lt;&lt; image.getFileName()
  
  for (int i = 0; i &lt; m.groupCount(); i++) {
      list &lt;&lt; m[i][1]
  }
  </code></pre>
  
  <p>And so on. Which is the current way to do this?</p>