aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-25 12:27:17 -0700
committerAllan Wang <me@allanwang.ca>2017-07-25 12:27:17 -0700
commit3a1561bbc9b6aab98370a4b51ef07ed05a92daa9 (patch)
treef586fc5789777dca485919719d8b85f72c83ec53
parentaaedf98c7c2eb9381c704367e040471cb2e9d094 (diff)
downloadkau-3a1561bbc9b6aab98370a4b51ef07ed05a92daa9.tar.gz
kau-3a1561bbc9b6aab98370a4b51ef07ed05a92daa9.tar.bz2
kau-3a1561bbc9b6aab98370a4b51ef07ed05a92daa9.zip
Add checker for signing
-rw-r--r--sample/build.gradle24
1 files changed, 14 insertions, 10 deletions
diff --git a/sample/build.gradle b/sample/build.gradle
index 6fdf24a..3350b3b 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -38,24 +38,28 @@ android {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
- signingConfigs {
+ def releaseSigning = file("../files/kau.properties")
+ def hasSigning = releaseSigning.exists()
- def releaseProps = new Properties()
- file("../files/kau.properties").withInputStream { releaseProps.load(it) }
+ if (hasSigning) {
+ signingConfigs {
- release {
- storeFile file("../files/kau.keystore")
- storePassword releaseProps.getProperty('storePassword')
- keyAlias releaseProps.getProperty('keyAlias')
- keyPassword releaseProps.getProperty('keyPassword')
- }
+ def releaseProps = new Properties()
+ releaseSigning.withInputStream { releaseProps.load(it) }
+ release {
+ storeFile file("../files/kau.keystore")
+ storePassword releaseProps.getProperty('storePassword')
+ keyAlias releaseProps.getProperty('keyAlias')
+ keyPassword releaseProps.getProperty('keyPassword')
+ }
+ }
}
buildTypes {
release {
minifyEnabled true
- signingConfig signingConfigs.release
+ if (hasSigning) signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}