Last active
June 15, 2018 10:24
-
-
Save FranRiadigos/a40692dbbd390dd68de6bc76490afee8 to your computer and use it in GitHub Desktop.
Example of overriding an apk name with custom values and signed or unsigned suffix.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
applicationVariants.all { variant -> | |
variant.outputs.all { | |
outputFileName = | |
"${project.name.toLowerCase()}-" + // app | |
"${variant.flavorName}-" + // develop | |
"${variant.buildType.name}-" + // debug | |
"${versionCode}" + // 10101 | |
(variant.buildType.name.contains("release") | |
&& !variant.signingReady ? "-unsigned" : "") + // unsigned | |
".apk" // i.e.: app-develop-debug-10101-unsigned.apk | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment