title: Gradle warning: variant.getOutputFile() and variant.setOutputFile() are deprecated
body: <p>I am using the following simplified configuration in an Android application project.</p>
  
  <pre class="lang-groovy prettyprint-override"><code>android {
      compileSdkVersion 20
      buildToolsVersion "20.0.0"
  
      defaultConfig {
          minSdkVersion 8
          targetSdkVersion 20
          versionCode 1
          versionName "1.0.0"
  
          applicationVariants.all { variant -&gt;
              def file = variant.outputFile
              def fileName = file.name.replace(".apk", "-" + versionName + ".apk")
              variant.outputFile = new File(file.parent, fileName)
          }
      }    
  }
  </code></pre>
  
  <p>Now that I updated the Gradle plug-in to v.0.13.0 and Gradle to v.2.1. the following warnings appear:</p>
  
  <pre class="lang-java prettyprint-override"><code>WARNING [Project: :MyApp] variant.getOutputFile() is deprecated. 
      Call it on one of variant.getOutputs() instead.
  WARNING [Project: :MyApp] variant.setOutputFile() is deprecated. 
      Call it on one of variant.getOutputs() instead.
  WARNING [Project: :MyApp] variant.getOutputFile() is deprecated. 
      Call it on one of variant.getOutputs() instead.
  WARNING [Project: :MyApp] variant.setOutputFile() is deprecated. 
      Call it on one of variant.getOutputs() instead. 
  </code></pre>
  
  <p>How can I rewrite the Groovy script to get rid of the deprecation warnings?</p>