Skip to content

fix: regenerate Android Gradle scaffolding for runnable template (fixes #13) - #17

Merged
valorengels merged 5 commits into
mainfrom
session/android-scaffolding
Aug 21, 2026
Merged

fix: regenerate Android Gradle scaffolding for runnable template (fixes #13)#17
valorengels merged 5 commits into
mainfrom
session/android-scaffolding

Conversation

@valorengels

@valorengels valorengels commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Regenerates the missing Android Gradle scaffolding so the template builds for Android.

Closes #13

Changes

  • Add standard Flutter Android platform scaffolding via flutter create --platforms=android: AndroidManifest.xml, build.gradle.kts, settings.gradle.kts, Gradle wrapper, resources.
  • Set minSdk = 23 (required by flutter_secure_storage 9.x, per docs/setup_reference.md).
  • Upgrade sentry_flutter 8.14.2 -> 9.27.0: required so the generated AGP 9.0.1 / Kotlin 2.3.20 toolchain can compile the plugin (8.14.2 hardcodes Kotlin languageVersion 1.6, dropped in Kotlin 2.x).
  • Note in key.properties.example that release signing via key.properties is deferred to the follow-up issue Release signing: key.properties + keystore for make build-android #18.

Verification

  • flutter build apk --debug succeeds (exit 0).
  • Toolchain (committed): AGP 9.0.1, Kotlin 2.3.20, Gradle wrapper 9.1.0, compileSdk/targetSdk 36, minSdk 23, JDK 17, Android SDK 36.
  • applicationId = com.example.flutter_template (derives from pubspec flutter_template; substring match per plan).

Out of scope (per plan)

Release signing (make build-android / flutter build apk --release) is NOT verified here; deferred to follow-up issue #18 "Release signing: key.properties + keystore for make build-android".

…plate

Add the standard Flutter Android platform scaffolding (manifest, gradle
files, wrapper, resources) via flutter create --platforms=android.

- minSdk = 23 for flutter_secure_storage 9.x (docs/setup_reference.md)
- applicationId com.example.flutter_template derives from pubspec name
- upgrade sentry_flutter 8.14.2 -> 9.27.0: required so the generated
  AGP 9.0.1 / Kotlin 2.x toolchain can compile the plugin (8.14.2
  hardcodes Kotlin languageVersion 1.6, dropped in Kotlin 2.x)

Verified: flutter build apk --debug succeeds.
Release signing (make build-android) remains out of scope per plan;
deferred to follow-up issue.
The generated android/app/build.gradle.kts signs the release build with the
debug keystore (Flutter default) and does not read key.properties. Add a NOTE
to the example so it stays accurate, per plan Risk 2 (update the example when
the generated release-signing block diverges). Real release signing is tracked
in the follow-up issue.
@valorengels

Copy link
Copy Markdown
Contributor Author

Review: Changes Requested — Tech Debt

The Android Gradle scaffolding is regenerated correctly and the debug build succeeds (verified: flutter build apk --debug → exit 0, app-debug.apk produced). All plan acceptance criteria for the debug-build gate pass: manifest and wrapper present, minSdk = 23, applicationId = com.example.flutter_template (contains flutter_template), existing tracked files preserved, and key.properties.example gained only the planned release-signing NOTE (Risk 2 mitigation). No blockers.

One tech_debt finding: the disclosed release-signing follow-up issue does not exist.

Rubric

  • 1. Plan vs. implementation match — pass — debug-build gate fully satisfied; the sentry_flutter upgrade (8.14.2 → 9.27.0) is a documented plan deviation required for the Kotlin 2.x toolchain to compile
  • 2. New code quality — pass — standard generated scaffolding, minimal hand edits, clear inline comments
  • 3. Test coverage — n/a — build-config-only change; the verification is the debug build, per plan
  • 4. Regression risk to existing callers — pass — no Dart/API surface changes; only android/ + pubspec dependency bump
  • 5. Data integrity — n/a — no data/schema changes
  • 6. Security — pass — no secrets committed; key.properties.example keeps placeholders; keystore ignored
  • 7. Documentation accuracy — pass — key.properties.example NOTE accurately describes the deferred signing; README unchanged
  • 8. PR body accuracy — pass — build/toolchain claims match reproduced results
  • 9. Disclosed deferrals — fail — release-signing deferral claimed but its follow-up issue does not resolve to an open GitHub issue
  • 10. Follow-up claims verified — fail — "deferred to follow-up issue Release signing: key.properties + keystore for make build-android" resolves to no open issue

Pre-Verdict Checklist

  • 1. All plan acceptance/success criteria validated against diff — PASS — all debug-gate criteria met; release build correctly out of scope
  • 2. No-Gos from plan — none violated — PASS — no-Go scope respected (no release signing, no external SDK install)
  • 3. New except Exception blocks — each has logger/raise/swallow-ok — N/A — no exception handlers added (GeneratedPluginRegistrant regenerated from template)
  • 4. New integration tests — exercise serialization boundary — N/A — no tests added; build-config change
  • 5. Plan internal consistency — spike findings match task steps — PASS
  • 6. No hardcoded secrets or debug artifacts — PASS — keystore/key.properties properly ignored
  • 7. New public APIs — docstrings present — N/A — no new public APIs
  • 8. Breaking changes — migration path documented — N/A — no breaking API changes
  • 9. Tests added for new behavior — N/A — no runtime behavior added
  • 10. Tests cover the failure path — N/A — no new code paths; build is the gate
  • 11. UI changes — screenshot captured — N/A — no UI files in diff
  • 12. Docs updated for user-facing changes — PASS — key.properties.example NOTE added

Verified

  • Code correctness
  • Security (no vulnerabilities found)
  • Plan requirements met

Blockers

  • None

Tech Debt

  • android/key.properties.example — release-signing NOTE claims deferral to follow-up issue "Release signing: key.properties + keystore for make build-android" (also in PR body and plan No-Gos/CONCERN 2) — Issue: No such tracking issue exists in the repo (gh issue list --state all shows issues 1–15; searches for "release signing", "key.properties", "keystore" return nothing relevant). The disclosed deferral does not resolve to an open GitHub issue. Severity: tech_debt — Fix: File the concrete follow-up issue (owner: yudame, linked to Make the template a runnable Android project (missing Gradle scaffolding) #13) titled "Release signing: key.properties + keystore for make build-android", and reference its number in the plan's completion note / PR body.

Nits

  • Android build output — toolchain advisory — flutter build apk --debug emits a forward-looking warning: "Your app uses the following plugins that apply Kotlin Gradle Plugin (KGP): package_info_plus, sentry_flutter. Future versions of Flutter will fail to build if your app uses plugins that apply KGP." This is an upstream plugin-migration advisory, not actionable in this PR, but worth tracking for the template.

Miscellaneous

  • None

Acknowledged Deferrals (verified)

  • None

Verification Results

  • flutter build apk --debugexit 0 (reproduced; app-debug.apk built)
  • test -f android/app/src/main/AndroidManifest.xml — PASS
  • test -f android/gradlew — PASS
  • grep 'minSdk = 23' android/app/build.gradle.kts — PASS
  • grep 'applicationId' android/app/build.gradle.ktscom.example.flutter_template (contains flutter_template)
  • git diff --name-status main -- android/ | grep '^D' — no deletions
  • Toolchain (committed): AGP 9.0.1, Kotlin 2.3.20, Gradle wrapper 9.1.0, compileSdk/targetSdk 36, minSdk 23, JDK 17 — matches plan decision (a)

File the concrete follow-up issue 'Release signing: key.properties +
keystore for make build-android' (#18, linked to #13) and reference its
number in the plan, PR description, and key.properties.example, resolving
the review tech-debt blocker.
@valorengels
valorengels merged commit 0b90790 into main Aug 21, 2026
3 checks passed
@valorengels
valorengels deleted the session/android-scaffolding branch August 21, 2026 11:10
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.

Make the template a runnable Android project (missing Gradle scaffolding)

1 participant