Android: Add way to inject signing keys into build.gradle externally.

This commit is contained in:
Henrik Rydgård 2017-03-20 11:06:52 +01:00
parent d4ea291a10
commit 9f26d573e6

View File

@ -8,7 +8,19 @@ android {
optimized {
storeFile file("debug.keystore")
}
release {
// Set these in a system global (or project local, but not checked in) gradle.properties .
if (project.hasProperty("RELEASE_STORE_FILE")) {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
} else {
release {
// Can't build release builds without a key store.
}
}
}
compileSdkVersion 25