[tor-commits] [orbot/master] make keystore props reading not fail if not present

n8fr8 at torproject.org n8fr8 at torproject.org
Tue Apr 28 21:05:01 UTC 2020


commit d95f1973e68a6cfd2dd535d320539094c83e691d
Author: n8fr8 <nathan at guardianproject.info>
Date:   Thu Sep 5 12:21:32 2019 -0400

    make keystore props reading not fail if not present
---
 app-mini/build.gradle | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/app-mini/build.gradle b/app-mini/build.gradle
index 4535adcf..9ff84c1c 100644
--- a/app-mini/build.gradle
+++ b/app-mini/build.gradle
@@ -8,15 +8,19 @@ def keystorePropertiesFile = rootProject.file("keystore.properties")
 def keystoreProperties = new Properties()
 
 // Load your keystore.properties file into the keystoreProperties object.
-keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
+if (keystorePropertiesFile.canRead()) {
+    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
+}
 
 android {
     signingConfigs {
         release {
-            keyAlias keystoreProperties['keyAlias']
-            keyPassword keystoreProperties['keyPassword']
-            storeFile file(keystoreProperties['storeFile'])
-            storePassword keystoreProperties['storePassword']
+            if (keystorePropertiesFile.canRead()) {
+                keyAlias keystoreProperties['keyAlias']
+                keyPassword keystoreProperties['keyPassword']
+                storeFile file(keystoreProperties['storeFile'])
+                storePassword keystoreProperties['storePassword']
+            }
         }
     }
 





More information about the tor-commits mailing list