From d8481c80c74c5bfbe3d316cb5113691bb6186137 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Wed, 1 Oct 2014 21:42:37 +0100 Subject: Add optional signing configuaration --- app/build.gradle | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'app') diff --git a/app/build.gradle b/app/build.gradle index 880d54b..3ceeb75 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -27,10 +27,18 @@ android { testInstrumentationRunner "android.test.InstrumentationTestRunner" } + signingConfigs { + release + } + buildTypes { release { runProguard true proguardFiles 'proguard.cfg' + + if (project.hasProperty('keystorePassword')) { + signingConfig signingConfigs.release + } } debug { @@ -38,3 +46,10 @@ android { } } } + +if (project.hasProperty('keystorePassword')) { + android.signingConfigs.release.storeFile file(keystoreFile) + android.signingConfigs.release.storePassword keystorePassword + android.signingConfigs.release.keyAlias keystoreAlias + android.signingConfigs.release.keyPassword keystorePassword +} -- cgit v1.2.3