From 270160e65acfdcf1203969065a15b5edc79bf698 Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 7 Oct 2014 21:40:25 -0400 Subject: [PATCH] Support reading signing config values from Gradle properties --- build.gradle | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/build.gradle b/build.gradle index 06bef66a8..f22848984 100644 --- a/build.gradle +++ b/build.gradle @@ -60,6 +60,16 @@ android { } } + signingConfigs { + release + } + + buildTypes { + release { + signingConfig signingConfigs.release + } + } + // Do not abort build if lint finds errors lintOptions { abortOnError false @@ -86,3 +96,16 @@ task testsOnJVM(type: GradleBuild, dependsOn: assemble) { buildFile = 'tests-on-jvm/build.gradle' tasks = ['test'] } + +if (project.hasProperty('keyAlias')) { + android.signingConfigs.release.keyAlias = keyAlias +} +if (project.hasProperty('keyPassword')) { + android.signingConfigs.release.keyPassword = keyPassword +} +if (project.hasProperty('storeFile')) { + android.signingConfigs.release.storeFile = file(storeFile) +} +if (project.hasProperty('storePassword')) { + android.signingConfigs.release.storePassword = storePassword +}