From 738027d527c2e67a1e0895143964da15694f3242 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Thu, 27 Aug 2026 21:09:56 +0200 Subject: [PATCH] Phase 4 prereq: pin explicit min/target/compile SDK on the phone app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All three were delegated to the Flutter Gradle plugin, so there was no floor to reason about — and full-screen-intent and foreground-service semantics both changed at API 34/35, which is exactly the code the alarm path needs. - compileSdk/targetSdk = 36, matching the target phone. - minSdk = 28: the floor for android:showWhenLocked / android:turnScreenOn as plain manifest attributes (no legacy branch), which also clears flutter_secure_storage's API 23 and Flutter's own default of 24. Verified with `flutter build apk --debug` (exit 0). Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01EckWmyfetYq3Mi8MAnUudh --- phone_app/android/app/build.gradle.kts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/phone_app/android/app/build.gradle.kts b/phone_app/android/app/build.gradle.kts index a8cd6f6..6b0517e 100644 --- a/phone_app/android/app/build.gradle.kts +++ b/phone_app/android/app/build.gradle.kts @@ -18,7 +18,10 @@ val keystoreProperties = Properties().apply { android { namespace = "com.kuhy.wake_alarm_sync" - compileSdk = flutter.compileSdkVersion + // Pinned explicitly rather than delegated to the Flutter Gradle plugin: + // full-screen-intent and foreground-service semantics both changed at + // API 34/35, and the alarm path cannot be reasoned about without a floor. + compileSdk = 36 ndkVersion = flutter.ndkVersion compileOptions { @@ -28,9 +31,13 @@ android { defaultConfig { applicationId = "com.kuhy.wake_alarm_sync" - // flutter_secure_storage requires API 23+ (Android Keystore). - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion + // 28 is the floor for android:showWhenLocked / android:turnScreenOn as + // plain manifest attributes, which the ring activity relies on; it also + // clears flutter_secure_storage's API 23 (Android Keystore) requirement + // and Flutter's own default of 24. + minSdk = 28 + // Matches the target phone. Keep in step with compileSdk above. + targetSdk = 36 versionCode = flutter.versionCode versionName = flutter.versionName }