fix: make Android signing config conditional on ANDROID_KEYSTORE_PATH
BuildAndroidRelease intentionally builds without setting up the keystore (unsigned AAB is later stamped and re-signed by SignAndroidBundle). The old signingConfigs block called error() at Gradle configuration time, failing even when the keystore is not needed for the build step. Closes #439 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
31c0479fc9
commit
91011a59ed
@@ -22,13 +22,17 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
keyAlias = "upload"
|
||||
val pass = System.getenv("ANDROID_KEYSTORE_PASSWORD")
|
||||
storePassword = pass
|
||||
keyPassword = pass
|
||||
storeFile = file(System.getenv("ANDROID_KEYSTORE_PATH") ?: error("ANDROID_KEYSTORE_PATH is not set"))
|
||||
val ksPath: String? = System.getenv("ANDROID_KEYSTORE_PATH")
|
||||
|
||||
if (ksPath != null) {
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
keyAlias = "upload"
|
||||
val pass = System.getenv("ANDROID_KEYSTORE_PASSWORD") ?: ""
|
||||
storePassword = pass
|
||||
keyPassword = pass
|
||||
storeFile = file(ksPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +48,9 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
if (ksPath != null) {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
ndk {
|
||||
|
||||
Reference in New Issue
Block a user