Prepare Google Play release with age-gated ads and store assets
This commit is contained in:
+16
-5
@@ -6,7 +6,7 @@
|
||||
|
||||
## 30-second summary
|
||||
|
||||
- **What it is:** an offline illustrated logic-puzzle notebook ("Lumen", version 2.0.2+11).
|
||||
- **What it is:** an offline illustrated logic-puzzle notebook ("Lumen", version 2.0.3+12).
|
||||
- **Stack:** Flutter 3.47.5 / Dart 3.13.4, Material widgets, no backend and no account.
|
||||
- **Entry point:** `main()` in `lib/main.dart` → `StoryLibrary.load()` + `Progress.load()` → open selected story/language → `Game(...)` → `await game.restore()` → `game.showLibrary()` → `runApp(LumenApp(game: game))`. The shelf is the first window; `restore()` has already positioned each book's saved leaf so choosing a book resumes it. `Book.load()` remains an English Mara compatibility loader for existing tests/tools.
|
||||
- **State:** one `Game extends ChangeNotifier` (`lib/domain/game.dart`) owns the current screen, puzzle session, marks, undo history and progress. `_NotebookState` listens to it and rebuilds the active screen.
|
||||
@@ -40,11 +40,13 @@ lib/
|
||||
│ ├── progress.dart Progress — typed façade over SharedPreferencesAsync
|
||||
│ ├── ambience.dart Ambience, Soundscape — location loops, fades and narration ducking
|
||||
│ ├── narrator.dart Narrator — just_audio playback and passage cues
|
||||
│ └── ads.dart Ads — UMP consent, rewarded hints, interstitials
|
||||
│ ├── ad_audience.dart AdAudience — local age group and ad treatment
|
||||
│ └── ads.dart Ads — age-gated UMP consent, rewarded hints, interstitials
|
||||
└── ui/
|
||||
├── paper.dart Paper, Leaf, Cover, Sketch, InkButton, PageSwipeBlocker
|
||||
├── board.dart Board, PencilMark painter, PixelPicture, PatternStamp
|
||||
├── discovery.dart Discovery — pattern-to-art transition and replay
|
||||
├── ad_age_group.dart Age-group choice shown before advertising starts
|
||||
├── translation.dart CopyScope, CopyText — translated controls, locale parsing and font fallback
|
||||
└── mara_story.dart Original-story presenter (part of main.dart); standard packages use standardStory
|
||||
|
||||
@@ -325,6 +327,12 @@ All writes go through `Progress.set` (memory is updated synchronously, disk is w
|
||||
| `notebook_read_ahead` | bool | `turn()` | Written when leaving the unsolved story puzzle; currently no reader |
|
||||
| `viewed_<pageId>` | bool | `Game.showStory` | Written per visited leaf; currently no reader |
|
||||
|
||||
### Advertising
|
||||
|
||||
| Key | Type | Written by | Purpose |
|
||||
| --- | --- | --- | --- |
|
||||
| `ad_age_group_v1` | String | age-group dialog | `under13` / `teen` / `adult` / `unknown`; Under 13 and unknown never initialize the ad SDK, teens use child-directed treatment and adults standard treatment |
|
||||
|
||||
### Puzzle progress and awards
|
||||
|
||||
| Key | Type | Written by | Purpose |
|
||||
@@ -414,12 +422,15 @@ Board key formats (`<key>`):
|
||||
| `test/library_test.dart` | All registered packages/locales, unique puzzles, identity-safe overlays, fallback/audio, independent story saves, live language switching, variable chapters, UI placeholders and invalid content |
|
||||
| `test/library_widget_test.dart` | Bookshelf as the app's first window (all books listed and one opened), actual library/language controls, translated metadata, German at larger text in both orientations, Arabic RTL/font behavior |
|
||||
| `test/puzzle_test.dart` | 40 Java reference boards (signed 64-bit seeds), 300 graded boards, solver counts vs. exhaustive search, campaign uniqueness/no-guess, streaks, fresh progress, read-ahead, daily awards and practice levels |
|
||||
| `test/ad_audience_test.dart` | Age-group mapping, fail-closed stored values, no ad requests for Under 13/unknown, every dialog option and first-launch persistence |
|
||||
| `test/widget_test.dart` | Pattern-to-art timing/replay, back-to-solved-grid navigation, rewarded hints in all modes, declined/unavailable ads and duplicate/stale callbacks, page swipes vs. grid drags, swipes over text/blank paper, vertical scrolling and cancelled drags, small/landscape/1.5× text, landscape two-column puzzle leaf, illustrated campaign reveals and pixel fallback at 1.5× text |
|
||||
| `integration_test/library_test.dart` | Isolated on-device bookshelf start, English/German switching, shared marks/bookmark/undo, story isolation, read-ahead and exactly-once completion; five screenshots |
|
||||
| `integration_test/notebook_test.dart` | On-device QA flow: six leaves, real WAV playback and pause/resume, bookmarks/discoveries, match and lantern solves, exactly-once awards, QA disk round-trip, screenshots |
|
||||
| `integration_test/cottage_test.dart` | All sixteen leaves, larger-text portrait/landscape, bookmarks, legacy-key marks, all four awards, all 23 narrator tracks and isolated test persistence; eight screenshots |
|
||||
| `integration_test/discovery_art_test.dart` | QA tablet screenshots of all twelve discoveries and the opening match memory, portrait/landscape at 1.5× text; checks reachable controls and unchanged awards |
|
||||
| `tool/shelf_screenshots_test.dart` | Renders the bookshelf at phone (360×640, 390×844, 1.5× text) and tablet (800×1280, 1280×800) metrics, asserts every card and Settings stay reachable without overflow, and writes `artifacts/library/shelf-*.png` |
|
||||
| `tool/capture_play_store_test.dart` | Renders five 1080×1920 Play Store phone screenshots from the real app at a 360×640 viewport and 3× output |
|
||||
| `scripts/build_android_release.sh` | Guarded production AAB build; requires real AdMob IDs and upload signing and refuses Google sample IDs |
|
||||
| `scripts/check_story_package.py` | Independent story script/cue/audio/master/archive and illustration validation |
|
||||
| `scripts/check_narration_assets.py` | Script text ↔ manifest ↔ WAV masters checksums |
|
||||
| `scripts/check_flutter_install.py` | Read-only installed-app smoke check and screenshots |
|
||||
@@ -502,10 +513,10 @@ Each run checks four discoveries in both orientations at 1.5× text, including n
|
||||
- **Generated boards are 7×7 without regions.** Authored campaign boards can have A/B/C areas. Legacy 5×5 save keys are retained but their marks are not mapped onto new grids.
|
||||
- **Landscape side columns scroll.** With very large text, notes or hint/undo can need scrolling; never shrink text to force a fit (see the root `ROADMAP.md`: keep vertical scrolling as the accessibility fallback).
|
||||
- **Gesture layering is deliberate.** `PageSwipeBlocker` wins horizontal drags inside boards/buttons while letting vertical drags scroll. Adding another horizontal recogniser around a board can break page turns or mark gestures.
|
||||
- **Ads are optional by design.** `adsEnabled: false` in tests, `supported` guard in the service, and `between()` always routes even on no-fill.
|
||||
- **Ads are age-gated.** `AdAudience` stores only a broad local group; Under 13 and unknown-age players never initialize the ad SDK. Teens use child-directed treatment and adults standard treatment. `adsEnabled: false` in tests, `supported` guard in the service, and `between()` always routes even on no-fill.
|
||||
- **Narration assets are checksum-locked.** `check_narration_assets.py` requires the scripts, manifests and WAV masters to agree; edit them together.
|
||||
- **QA integration test fails without `--dart-define=QA_TEST=true`** and should run on the `qa` flavour (`com.lumen.daily.qa`).
|
||||
- **`build/`, `artifacts/`, `.dart_tool/`, IDE state and signing keys are ignored.** Do not commit APKs or screenshots; `pubspec.lock` is tracked.
|
||||
- **`build/`, `artifacts/`, `.dart_tool/`, IDE state and signing keys are ignored.** Do not commit APKs or generated screenshots; upload-ready Play assets in `store/` are intentionally tracked, and `pubspec.lock` is tracked.
|
||||
|
||||
## Grep anchors
|
||||
|
||||
@@ -537,7 +548,7 @@ grep -rn "ValueKey('cell-\|leaf-scroll\|leaf-side-scroll" lib test
|
||||
python3 scripts/check_soundscape_assets.py` after structural edits.
|
||||
- The map is hand-maintained; no generator or CI check keeps it current, so treat drift as a bug.
|
||||
|
||||
_Last reviewed against version 2.0.2+11._
|
||||
_Last reviewed against version 2.0.3+12._
|
||||
|
||||
The cast diary audio system adds `lib/domain/soundscape.dart` (package-defined loops),
|
||||
`narration/cast.json` and segmented scripts in the Halloween package, plus
|
||||
|
||||
Reference in New Issue
Block a user