I want to have the versionName included in the name of the output APK files from my Android build.
versionName
There\'s an another answer that works with pre-0.14.x
You need one more loop now that each variant can have multiple outputs:
android { applicationVariants.all { variant -> variant.outputs.each { output -> output.outputFile = new File( output.outputFile.parent, output.outputFile.name.replace(".apk", "-${variant.versionName}.apk")) } } }