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

commit 917780353f1e768ab5e7671c991a535ac6a5ed99 Author: sisbell <shane.isbell@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 {
participants (1)
-
n8fr8@torproject.org