From 1ff29ae86b441bc3d0f5eb75d0bdc76f92b7dabe Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 10 Aug 2018 17:07:52 +0200 Subject: Making release signing and publishing conditional So app can be built by F-Droid --- app/build.gradle | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/build.gradle b/app/build.gradle index d475102..d4db5ee 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -23,8 +23,9 @@ apply plugin: 'kotlin-kapt' apply plugin: 'com.github.triplet.play' def keystorePropertiesFile = rootProject.file("keystore.properties") +def keystoreAvailable = keystorePropertiesFile.exists() def keystoreProperties = new Properties() -keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +if (keystoreAvailable) keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android { compileSdkVersion 27 @@ -42,7 +43,7 @@ android { } } - signingConfigs { + if (keystoreAvailable) signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] @@ -53,7 +54,7 @@ android { buildTypes { release { - signingConfig signingConfigs.release + if (keystoreAvailable) signingConfig signingConfigs.release minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } @@ -92,7 +93,7 @@ repositories { } play { - jsonFile = file(keystoreProperties['apiKeyFile']) + if (keystoreAvailable) jsonFile = file(keystoreProperties['apiKeyFile']) track = 'beta' untrackOld = true uploadImages = true -- cgit v1.2.3