1
0
mirror of https://github.com/etesync/android synced 2024-11-15 12:28:57 +00:00

Add a way to sign releases.

This commit is contained in:
Tom Hacohen 2017-02-16 15:14:40 +00:00
parent a50eb87162
commit 8cfe58a7d1

View File

@ -86,6 +86,33 @@ android {
defaultConfig {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
/*
* To sign release build, create file gradle.properties in ~/.gradle/ with this content:
*
* signingStoreLocation=/home/key.store
* signingKeyAlias=alias
*
* and set the KSTOREPWD env var to the store and key passwords (should be the same)
*/
if (project.hasProperty('signingStoreLocation') &&
project.hasProperty('signingKeyAlias')) {
println "Found sign properties in gradle.properties! Signing build…"
signingConfigs {
release {
storeFile file(signingStoreLocation)
storePassword System.getenv("KSTOREPWD")
keyAlias signingKeyAlias
keyPassword System.getenv("KSTOREPWD")
}
}
buildTypes.release.signingConfig = signingConfigs.release
} else {
buildTypes.release.signingConfig = null
}
}
dependencies {