Android: optional local release signing (keystores ignored; passwords via ~/.gradle/gradle.properties, debug unaffected)
This commit is contained in:
parent
d9f3d0b5c4
commit
a445105d86
2 changed files with 18 additions and 0 deletions
|
|
@ -23,6 +23,21 @@ android {
|
|||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
|
||||
// Local release key (never committed): passwords live in
|
||||
// ~/.gradle/gradle.properties as SHONAR_STORE_PASSWORD /
|
||||
// SHONAR_KEY_PASSWORD. Debug builds are unaffected.
|
||||
val ksProps = mapOf(
|
||||
"store" to (project.findProperty("SHONAR_STORE_PASSWORD") as String?),
|
||||
"key" to (project.findProperty("SHONAR_KEY_PASSWORD") as String?),
|
||||
)
|
||||
if (ksProps.values.all { !it.isNullOrBlank() }) {
|
||||
signingConfig = signingConfigs.maybeCreate("localRelease").apply {
|
||||
storeFile = rootProject.file("keystores/shonar-release.jks")
|
||||
storePassword = ksProps["store"]
|
||||
keyAlias = "shonar"
|
||||
keyPassword = ksProps["key"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue