Play Store Screenshots
What's tracked in git
- en-US only (6 PNGs) —
fastlane/metadata/android/en-US/images/phoneScreenshots/. This is the set the README gallery links to. - The other 38 locales — gitignored. Generated on demand for upload, not committed.
The .gitignore rule (lines following app/src/screenshotTest*/reference/) ignores all phone screenshots and !-includes only en-US.
generate_screenshots.sh --smoke renders 6 locales (en-US, de-DE, ja-JP, ar, zh-CN, pt-BR) covering LTR, RTL, and CJK. It is a rendering-iteration aid for checking layout under different scripts — it has nothing to do with what git tracks. Of its output, only the en-US set is committable; the other five land as ignored files.
Why en-US only
- Reviewable diffs — a screenshot refresh that touches 6 PNGs is reviewable; 234 PNGs is not.
- Repo size — keeps binary churn out of git history.
- Fastlane behavior —
supplyskips locales with no local screenshot files, so unpushed locales keep whatever Play Store currently has. This is current Fastlane uploader behavior, not a Play Store guarantee.
Full regeneration + upload (on demand)
Generate all 39 locales:
./fastlane/generate_screenshots.shBatched gradle screenshot rendering (~20 batches, ~10–15 min). The script exits non-zero if the final PNG count differs from the expected 234 (39 × 6).
Copy rendered PNGs into fastlane metadata dirs:
./fastlane/copy_screenshots.sh --cleanOutput:
fastlane/metadata/android/<locale>/images/phoneScreenshots/*.pngfor all 39 locales. Exits non-zero on an unknown composable name or an incomplete locale.Verify count before upload:
find fastlane/metadata/android -path "*/images/phoneScreenshots/*.png" | wc -l # expect 234Upload to Play Store:
cd fastlane && bundle exec fastlane screenshots_onlyThe lane invokes
remove_unsupported_languages.shfirst, which deletesckb-IRandku-TRtranslation dirs (and harmlessly errors on the other 14 absent dirs in its list).fastlane/Appfileis gitignored (.gitignoreline 15) and holds thejson_key_file(...)path to the Play service-account key, so it is absent in a fresh clone and in every git worktree. Without itsupplyfalls back to Google Application Default Credentials and fails withGoogle::Auth::InitializationError — Your credentials were not found., which points at Google auth instead of at the missing file. Copy it in from the main checkout first (run from the repo root); it stays gitignored, so it cannot be committed by accident:cp <main-checkout>/fastlane/Appfile fastlane/AppfileRestore working tree (run this even if the upload FAILED):
git clean -fdX fastlane/metadata/android # removes only ignored files (the 38 non-en-US screenshot sets) git checkout -- fastlane/metadata/android/ckb-IR fastlane/metadata/android/ku-TRgit clean -fdXremoves only gitignored files, so tracked screenshots, translations, and listing assets are untouched. Thegit checkoutrestores the two translation dirs the lane deleted. That deletion happens beforesupplyruns, so a failed upload leaves those tracked dirs deleted too.
After the first en-US-only upload
Spot-check at least one non-en-US locale (e.g. fr-FR) in Play Console → Store listing → that locale, and confirm screenshots are still present. This validates the "Fastlane skips locales with no local files" assumption against current Play Store behavior. If other locales lose their screenshots, the workflow needs adjustment (e.g. always upload the full 39 set, or revert the gitignore split).
When screenshots change
Re-render across scripts while iterating, then copy:
./fastlane/generate_screenshots.sh --smoke
./fastlane/copy_screenshots.sh --clean
Only the en-US set ends up in the commit (typically Apps: / Permissions: / General: depending on what UI changed); the other five renders stay ignored and can be dropped with git clean -fdX fastlane/metadata/android.