[Android] Fix vlc revision resource

Geoffrey Métais git at videolan.org
Wed Apr 20 14:49:27 CEST 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 20 14:49:03 2016 +0200| [4bdf8d5f7ce3c50ec542542362f5fb801f71190f] | committer: Geoffrey Métais

Fix vlc revision resource

> https://code.videolan.org/videolan/vlc-android/commit/4bdf8d5f7ce3c50ec542542362f5fb801f71190f
---

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

diff --git a/vlc-android/build.gradle b/vlc-android/build.gradle
index a330ff3..7fd77b4 100644
--- a/vlc-android/build.gradle
+++ b/vlc-android/build.gradle
@@ -33,6 +33,7 @@ android {
         resValue "string", "build_time", buildTime()
         resValue "string", "build_host", hostName()
         resValue "string", "build_revision", revision()
+        resValue "string", "build_vlc_revision", vlcRevision()
 
         tasks.whenTaskAdded { task ->
             if (task.name.startsWith('assemble')) {
@@ -225,15 +226,20 @@ def hostName() {
 
 def revision() {
     def code = new ByteArrayOutputStream()
-    def vlc = new ByteArrayOutputStream()
     exec {
         commandLine 'git', 'rev-parse', '--short', 'HEAD'
         standardOutput = code
     }
+    return code.toString()
+}
+
+def vlcRevision() {
+    def code = new ByteArrayOutputStream()
+    def vlc = new ByteArrayOutputStream()
     exec {
         commandLine 'git', 'rev-parse', '--short', 'HEAD'
         workingDir '../vlc'
         standardOutput = vlc
     }
-    return code.toString()+"VLC: "+vlc.toString()
+    return vlc.toString()
 }
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 b63611c..76c64ab 100644
--- a/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
+++ b/vlc-android/src/org/videolan/vlc/gui/helpers/UiTools.java
@@ -175,7 +175,7 @@ public class UiTools {
         TextView link = (TextView) v.findViewById(R.id.main_link);
         link.setText(Html.fromHtml(VLCApplication.getAppResources().getString(R.string.about_link)));
 
-        String revision = VLCApplication.getAppResources().getString(R.string.build_revision);
+        String revision = VLCApplication.getAppResources().getString(R.string.build_revision)+" VLC: "+VLCApplication.getAppResources().getString(R.string.build_vlc_revision);
         String builddate = VLCApplication.getAppResources().getString(R.string.build_time);
         String builder = VLCApplication.getAppResources().getString(R.string.build_host);
 



More information about the Android mailing list