[tor-commits] [orbot/master] Let project still build without a keystore.properties file. People

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


commit 397838ce19f59795317bc6caa1e2e17776a31460
Author: bim <dsnake at protonmail.com>
Date:   Thu Aug 8 15:25:07 2019 -0400

    Let project still build without a keystore.properties file. People
    cloning the repo don't need this file if they want to build Orbot
    locally.
---
 app/build.gradle | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/app/build.gradle b/app/build.gradle
index 573b1918..188b4150 100644
--- a/app/build.gradle
+++ b/app/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