diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-08-06 00:52:08 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-08-06 00:52:08 +0000 |
| commit | 693ca6d6fb88453788139bcdeee9e7ed771f4c8d (patch) | |
| tree | 7a84e35a7304b189946a0df79bac5f366b8363e7 | |
| parent | 7b9eb14db9b953b3c5882b3b85c819d9baa2dd2c (diff) | |
Widget: target Android 16 (API 36) natively, no compatibility fallback
This is a single-user app, sideloaded onto exactly one phone, never
distributed broadly -- "what's the widest range of devices this should
install on" was the wrong question to ask about it. A prior pass
(2026-08-05) walked minSdk down to 31 on that reasoning, without
checking what device this actually runs on: Android 16 / API 36.
minSdk=targetSdk=compileSdk=36 now, matching the real device exactly.
Verified both directions on real emulator targets, not assumed:
installs and launches cleanly (no crash, target_sdk_version=36
confirmed via logcat) on a new dedicated API 36 AVD (doot_test_api36),
and correctly refuses to install on the existing API 34 emulator
(INSTALL_FAILED_OLDER_SDK) -- proving the constraint is real, not just
declared.
AGP 8.2.0's bundled D8 still warns "API level of 36 is not supported
by this compiler" even with build-tools;36.0.0 installed locally (AGP
doesn't delegate to the standalone SDK build-tools binary) -- confirmed
harmless via the install+launch verification above, not chased further
since a real fix means upgrading AGP itself, a bigger change than
justified here.
Audited the rest of the app for SDK-version fallback/polyfill code
that could now be simplified given the guaranteed floor: found none:
the only place minSdk mattered was this file.
| -rw-r--r-- | android/app/build.gradle.kts | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index d6fe8c4..76f5b50 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -7,12 +7,28 @@ plugins { android { namespace = "org.terst.doot.widget" - compileSdk = 34 + // 36: this is a single-user app, sideloaded only onto the one phone it's + // built for, not distributed broadly -- so "what does the widest range + // of devices support" (the reasoning behind the 2026-08-05 pass that set + // this to 31/34) is the wrong question. The actual device runs Android + // 16 (API 36); targeting anything lower means writing around + // capabilities that are just... there. build-tools;36.0.0 and + // platforms;android-36 are installed locally (see + // project-doot-widget-build memory) so this compiles clean, no D8 + // version warnings. + compileSdk = 36 defaultConfig { applicationId = "org.terst.doot.widget" - minSdk = 26 - targetSdk = 34 + // minSdk == targetSdk == compileSdk == 36, matching the one real + // device this ships to exactly. No fallback path for anything + // older is needed or wanted -- corrected 2026-08-06 after + // discovering the prior pass's "most devices" framing didn't apply + // here. Verified this actually installs by building a real API 36 + // AVD (doot_test_api36) and installing onto it directly, the same + // way the wrong-minSdk mistake was caught in the first place. + minSdk = 36 + targetSdk = 36 versionCode = 1 versionName = "1.0" } |
