diff options
author | Mohamed Zenadi <zeapo@users.noreply.github.com> | 2015-09-03 14:42:38 +0200 |
---|---|---|
committer | Mohamed Zenadi <zeapo@users.noreply.github.com> | 2015-09-03 14:42:38 +0200 |
commit | c534cfe49875c6fc84050cc02c653eb5a57bcddc (patch) | |
tree | fd230da3ef40a8a2666e674d6cf11e1c40da72ff | |
parent | 7d7ec73664a49af0aca06f80b4fae1e855a62b24 (diff) | |
parent | beafaecc4912139a1b378a8ea5c3590c2cb4ff4f (diff) |
Merge pull request #125 from betheg/signed_release
a way to generating signed release APK using gradle.
-rw-r--r-- | app/build.gradle | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/app/build.gradle b/app/build.gradle index c0c54fde..ed2352a6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -26,6 +26,33 @@ android { packagingOptions { exclude '.readme' } + + // + // 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 + } + } dependencies { |