Skip to content

fix(android): treat empty signing env vars as unset - #742

Merged
hectorqin merged 1 commit into
mainfrom
devin/1795667829-android-empty-key-password
Nov 26, 2026
Merged

hectorqin merged 1 commit into
mainfrom
devin/1795667829-android-empty-key-password

Conversation

@hectorqin

@hectorqin hectorqin commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Summary

GitHub Actions passes an unset secret as an empty string, so with ANDROID_KEY_PASSWORD unset READER_KEY_PASSWORD="" won over the ?: READER_KEYSTORE_PASSWORD fallback. As a result, :app:packageRelease failed with Failed to read key ... Get Key failed (first v1.0.0 tag run).

build.gradle.kts now reads every signing variable through env(name), which maps "" to null:

fun env(name: String) = providers.environmentVariable(name).orNull?.takeIf { it.isNotEmpty() }
keyPassword = env("READER_KEY_PASSWORD") ?: env("READER_KEYSTORE_PASSWORD")

Tested locally: assembleRelease with a test keystore and READER_KEY_PASSWORD= (empty) now succeeds, and the APK is signed with that keystore (apksigner verify).


Julia opened this PR for Qin
Implemented in session Add Android build and GitHub release to CI
Review with Devin · Open in Devin Desktop


Co-Authored-By: qin hector <hectorq.me@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@hectorqin
hectorqin merged commit 1e2bf3d into main Nov 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant