title: variant.getOutputFile() is deprecated. Call it on one of variant.getOutputs() instead
body: <p>This has been coming up since the bump to gradle 2.1 in Android Gradle plugin 0.13.0, but for the life of me I can't understand why logs this warning sometimes.</p>
  
  <p>Consider this block for renaming APKs based on variant type:</p>
  
  <pre><code>applicationVariants.all { variant -&gt;
      variant.outputs.each { output -&gt;
          def oldFile = output.outputFile
          if (oldFile != null &amp;&amp; oldFile.name.endsWith('.apk')) {
              def newFile = "Fancy conditionally-formatted file name here"
              print "\nBefore"
              output.outputFile = new File(oldFile.parent, newFile)
              print "\nAfter"
          }
      }
  }
  </code></pre>
  
  <p>Looking at the gradle logs, I see this:</p>
  
  <pre><code>Before
  WARNING [Project: &lt;myproject&gt;] variant.getOutputFile() is deprecated. Call it on one of variant.getOutputs() instead.
  WARNING [Project: &lt;myproject&gt;] variant.getProcessResources() is deprecated. Call it on one of variant.getOutputs() instead.
  After
  </code></pre>
  
  <p>Which would <em>seem</em> to suggest that calling the line <code>output.outputFile = new File(oldFile.parent, newFile)</code> throws this warning. Thing is, Google specifically uses this style in their example at the bottom of <a href="http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits#TOC-Variant-API-Version-Code-support" rel="nofollow">this page</a>. If we can't touch <code>output</code> at all, how can we set its <code>outputFile</code>?</p>
  
  <p>On top of this, I don't see how <code>getProcessResources()</code> is involved.</p>
  
  <p>Any ideas?</p>