[tor-commits] [orbot/master] Use def rather than ext for defining getVersionName. This avoids a conflict with internal gradle API.

n8fr8 at torproject.org n8fr8 at torproject.org
Wed Dec 22 21:55:09 UTC 2021


commit 917780353f1e768ab5e7671c991a535ac6a5ed99
Author: sisbell <shane.isbell at gmail.com>
Date:   Sun Aug 1 13:08:15 2021 -0700

    Use def rather than ext for defining getVersionName. This avoids a conflict with internal gradle API.
---
 app/build.gradle      | 10 ++++++++++
 commons-device.gradle | 10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/app/build.gradle b/app/build.gradle
index bacc32fe..ea344c7b 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,5 +1,15 @@
 apply from: "../commons-device.gradle"
 
+/* gets the version name from the latest Git tag, stripping the leading v off */
+def getVersionName = { ->
+    def stdout = new ByteArrayOutputStream()
+    exec {
+        commandLine 'git', 'describe', '--tags', '--always'
+        standardOutput = stdout
+    }
+    return stdout.toString().trim()
+}
+
 android {
     defaultConfig {
         applicationId "org.torproject.android"
diff --git a/commons-device.gradle b/commons-device.gradle
index 1957d67c..02f92f21 100644
--- a/commons-device.gradle
+++ b/commons-device.gradle
@@ -15,16 +15,6 @@ ext.createKeyStoreProperties = { ->
     return properties
 }
 
-/* gets the version name from the latest Git tag, stripping the leading v off */
-ext.getVersionName = { ->
-    def stdout = new ByteArrayOutputStream()
-    exec {
-        commandLine 'git', 'describe', '--tags', '--always'
-        standardOutput = stdout
-    }
-    return stdout.toString().trim()
-}
-
 def keystoreProperties = createKeyStoreProperties()
 
 android {





More information about the tor-commits mailing list