[Android] Fix apk name on CLI builds
Geoffrey Métais
git at videolan.org
Mon Jan 27 16:05:43 CET 2020
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 27 11:36:37 2020 +0100| [22d99a96d54558cd6a8eae852b949e1812ebff93] | committer: Geoffrey Métais
Fix apk name on CLI builds
> https://code.videolan.org/videolan/vlc-android/commit/22d99a96d54558cd6a8eae852b949e1812ebff93
---
application/app/build.gradle | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/application/app/build.gradle b/application/app/build.gradle
index 3cb273c64..c7d749e74 100644
--- a/application/app/build.gradle
+++ b/application/app/build.gradle
@@ -118,7 +118,9 @@ android {
applicationVariants.all { variant ->
//Custom APK name and versionCode
variant.outputs.each { output ->
- def abiName = output.getFilter(com.android.build.OutputFile.ABI) ?: System.getenv('GRADLE_ABI')?.toLowerCase() ?: "all"
+ def outputAbi = output.getFilter(com.android.build.OutputFile.ABI)
+ def abiName = System.getenv('GRADLE_ABI')?.toLowerCase() ?: "all"
+ if (outputAbi != null) abiName = outputAbi
output.versionCodeOverride = 10000000 + defaultConfig.versionCode + abiCodes.get(abiName, 0)
def outputName = "VLC-Android-"
outputName += variant.versionName + "-" + abiName + ".apk"
More information about the Android
mailing list