aboutsummaryrefslogtreecommitdiffstats
path: root/build.gradle
diff options
context:
space:
mode:
authorSam Whited <sam@samwhited.com>2014-10-26 09:11:28 -0400
committerSam Whited <sam@samwhited.com>2014-10-26 09:11:28 -0400
commit90898ec3d440a5ebce99724d31954e583ea9f227 (patch)
tree8b9e56e4e2bd6513edcfdbe9f327377245233574 /build.gradle
parentc83e49d1b8863598d7b8718148234f9521c5c83d (diff)
Add some logic for signing releases
Diffstat (limited to '')
-rw-r--r--build.gradle29
1 files changed, 29 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle
index d6838b35..c46df4c7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -52,15 +52,44 @@ android {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
+
+ //
+ // To sign release builds, create the file `gradle.properties` in
+ // $HOME/.gradle or in your project directory with this content:
+ //
+ // mStoreFile=/path/to/key.store
+ // mStorePassword=xxx
+ // mKeyAlias=alias
+ // mKeyPassword=xxx
+ //
+ if (project.hasProperty('mStoreFile') &&
+ project.hasProperty('mStorePassword') &&
+ project.hasProperty('mKeyAlias') &&
+ project.hasProperty('mKeyPassword')) {
+ signingConfigs {
+ release {
+ storeFile file(mStoreFile)
+ storePassword mStorePassword
+ keyAlias mKeyAlias
+ keyPassword mKeyPassword
+ }
+ }
+ buildTypes.release.signingConfig = signingConfigs.release
+ } else {
+ buildTypes.release.signingConfig = null
+ }
+
buildTypes {
release {
runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
+
lintOptions {
disable 'MissingTranslation', 'InvalidPackage'
}
+
subprojects {
afterEvaluate {