[Android] Restore ABI display in 'About' view

Geoffrey Métais git at videolan.org
Mon Dec 10 10:31:25 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Dec 10 10:19:00 2018 +0100| [52d43c04a8477720d7adc342e1f0e941dfb0a7cf] | committer: Geoffrey Métais

Restore ABI display in 'About' view

> https://code.videolan.org/videolan/vlc-android/commit/52d43c04a8477720d7adc342e1f0e941dfb0a7cf
---

 compile.sh                                                | 2 +-
 vlc-android/build.gradle                                  | 3 ++-
 vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/compile.sh b/compile.sh
index f75d487fc..8c1ced948 100755
--- a/compile.sh
+++ b/compile.sh
@@ -338,7 +338,7 @@ else
         ACTION="assemble"
     fi
     TARGET="${ACTION}${BUILDTYPE}"
-    CLI="" ./gradlew $TARGET
+    CLI="" GRADLE_ABI=$GRADLE_ABI ./gradlew $TARGET
 fi
 
 #######
diff --git a/vlc-android/build.gradle b/vlc-android/build.gradle
index 7af9ec37b..563e449a3 100644
--- a/vlc-android/build.gradle
+++ b/vlc-android/build.gradle
@@ -153,11 +153,12 @@ android {
     applicationVariants.all { variant ->
         //Custom APK name and versionCode
         variant.outputs.each { output ->
-            def abiName = output.getFilter(OutputFile.ABI) ?: "all"
+            def abiName = output.getFilter(OutputFile.ABI) ?: System.getenv('GRADLE_ABI')?.toLowerCase() ?: "all"
             output.versionCodeOverride = 10000000 + defaultConfig.versionCode + abiCodes.get(abiName, 0)
             def outputName = "VLC-Android-"
             outputName += variant.versionName + "-" + abiName + ".apk"
             output.outputFileName = outputName
+            resValue "string", "build_abi", abiName
         }
     }
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
index ca3cab19f..4587e1e42 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
@@ -236,7 +236,7 @@ public class UiTools {
         final TextView compiled = v.findViewById(R.id.main_compiled);
         compiled.setText(builder + " (" + builddate + ")");
         final TextView textview_rev = v.findViewById(R.id.main_revision);
-        textview_rev.setText(v.getContext().getString(R.string.revision) + " " + revision + " (" + builddate + ") " + BuildConfig.FLAVOR);
+        textview_rev.setText(v.getContext().getString(R.string.revision) + " " + revision + " (" + builddate + ") " + v.getContext().getString(R.string.build_abi));
 
         final ImageView logo = v.findViewById(R.id.logo);
         logo.setOnClickListener(new View.OnClickListener() {



More information about the Android mailing list