title: Change apk output folder in Gradle 4.1
body: <p>I would like to change the APK <code>output folder</code> and this is what I used to do:</p>
  
  <pre><code>applicationVariants.all { variant -&gt;
      variant.outputs.all {
          def filePath = "${rootProject.rootDir.absolutePath}/apks/${variant.name}"
          println("My Path: " + filePath)
          outputFileName = filePath
      }
  }
  </code></pre>
  
  <p>However, it didn't work in <code>Gradle 4.1</code> (Android studio 3.0 preview). Instead of generating the folder as the path above, it generated the above path inside old <code>debug</code> folder like image below:</p>
  
  <p><a href="https://i.stack.imgur.com/EcI2E.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EcI2E.png" alt="enter image description here"></a></p>
  
  <p>Does anyone have a solution for this? Thanks.</p>