Skip to content

Commit 08cbf7b

Browse files
committed
review: gate release signing on all signing inputs (alias + key password)
Per Greptile: canSign only checked the keystore file + store password, so if ALIAS_NAME/ALIAS_PASS were absent while the others were present, Gradle would build a signing config with null alias/password and fail at packaging with an opaque error. Require all of keystore-exists + storePass + alias + keyPass non-blank before enabling release signing; otherwise skip cleanly.
1 parent 6fdfc82 commit 08cbf7b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

buildSrc/src/main/kotlin/Helpers.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ fun Project.setupAppCommon() {
124124
// otherwise skip it so debug / PR / keyless builds don't fail. Empty-string env vars
125125
// (unset GitHub secrets expand to "") count as absent.
126126
val releaseKeystore = rootProject.file("release.keystore")
127-
val canSign = !keystorePwd.isNullOrBlank() && releaseKeystore.exists()
127+
val canSign = releaseKeystore.exists() &&
128+
!keystorePwd.isNullOrBlank() &&
129+
!alias.isNullOrBlank() &&
130+
!pwd.isNullOrBlank()
128131

129132
android.apply {
130133
if (canSign) {

0 commit comments

Comments
 (0)