[stealth 11/11] Generate neutral stealth Android icons#8787
Closed
reflog wants to merge 8 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a deterministic, seed-keyed generator for “neutral” stealth Android icon resources, and wires Android/Make build steps to use the generated launcher icons when a stealth icon seed is provided.
Changes:
- Added a Python script + unit tests to procedurally generate seeded Android icon resources and metadata.
- Updated Android Gradle + AndroidManifest to switch launcher icon resources via manifest placeholders when
STEALTH_ICON_SEED/-PstealthIconSeedis set. - Added a Make target and documentation for generating and managing stealth icon resources.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/stealth/generate_android_icons.py | New deterministic icon resource generator and metadata writer. |
| scripts/stealth/generate_android_icons_test.py | Unit tests for file generation and determinism. |
| Makefile | Adds stealth-android-icons target and seed/res-dir variables. |
| docs/stealth-android-icons.md | Documents local generation, Gradle wiring, and seed handling policy. |
| android/app/src/main/AndroidManifest.xml | Switches launcher icon attributes to manifest placeholders. |
| android/app/build.gradle | Adds seed detection, generated res dir, icon placeholders, and generation task hooked into preBuild. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Resource entry names are retained in resources.arsc even with shrinkResources=true, making stealth_ic_launcher etc. a visible artifact fingerprint. Replace every stealth_* resource name with a neutral _alt-suffixed name: stealth_ic_launcher → ic_launcher_alt stealth_ic_launcher_round → ic_launcher_alt_round stealth_launcher_foreground → launcher_foreground_alt stealth_launcher_monochrome → launcher_monochrome_alt stealth_notification_icon → ic_notification_alt stealth_launcher_background → launcher_background_alt stealth_icon_colors.xml → icon_colors_alt.xml Update build.gradle placeholder targets, metadata values, and test assertions accordingly. Add a test guard that asserts no "stealth" token appears in any generated resource filename. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
57e4bff to
7f3f332
Compare
Contributor
Author
|
Superseded — the 11 per-issue stealth PRs were consolidated into a 6-PR stack for epic getlantern/engineering#3569. This work now lives in #8860. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
STEALTH_ICON_SEEDor-PstealthIconSeedis setCloses getlantern/engineering#3575
Validation
python3 -m unittest discover -s scripts/stealth -p *_test.pypython3 -m py_compile scripts/stealth/generate_android_icons.py scripts/stealth/generate_android_icons_test.pypython3 scripts/stealth/generate_android_icons.py --seed test-seed --output-res-dir /tmp/lantern-8778-icons-2/resmake -n stealth-android-icons STEALTH_ICON_SEED=test-seedmake -n android-apk-release STEALTH_ICON_SEED=test-seedgit diff --cached --checkNot run