From 053559f020006325c97f9373095639cd5be201d7 Mon Sep 17 00:00:00 2001 From: Darshan Parajuli Date: Sun, 12 Jul 2020 23:27:05 -0700 Subject: [PATCH] Fix build error on travis --- app/build.gradle | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 11c93ec..0c1b915 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,10 +3,6 @@ apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' -def keystorePropertiesFile = rootProject.file("keystore.properties") -def keystoreProperties = new Properties() -keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) - def fileProvider = "file_provider" android { @@ -25,10 +21,16 @@ android { signingConfigs { release { - keyAlias keystoreProperties['keyAlias'] - keyPassword keystoreProperties['keyPassword'] - storeFile file(keystoreProperties['storeFile']) - storePassword keystoreProperties['storePassword'] + try { + def keystoreProperties = new Properties() + keystoreProperties.load(new FileInputStream(rootProject.file("keystore.properties"))) + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile file(keystoreProperties['storeFile']) + storePassword keystoreProperties['storePassword'] + } catch (FileNotFoundException ignored) { + println("keystore file not found.") + } } }