title: Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated
body: <p>I was using the following code in my gradle script to rename the apks generated with AndroidStudio:</p>
  
  <pre><code>applicationVariants.all { variant -&gt;
      variant.outputs.each { output -&gt;
          output.outputFile = new File(output.outputFile.parent, defaultConfig.versionCode + "_" + output.outputFile.name)
      }
  }
  </code></pre>
  
  <p>So it was generating apks with names like: <strong>345-app-release.apk</strong>, where 345 is the versionCode.</p>
  
  <p>But after updating to AndroidStudio 3.0 it returns the following error:</p>
  
  <blockquote>
    <p>Cannot set the value of read-only property 'outputFile' for
    ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=debug,
    filters=[]}} of type
    com.android.build.gradle.internal.api.ApkVariantOutputImpl.</p>
  </blockquote>
  
  <p>How can I achieve a similar renaming with the new build tools.</p>