mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-22 12:22:17 +01:00
**The two shared Python libraries were four minor versions behind and the gate could not see it.** They are PEP 508 direct references (`gatelock @ git+...@gatelock-v0.4.1`), which parsed as unpinned PyPI packages that do not exist on PyPI -- an undeterminable answer, not a stale one. utils@7a682a4 teaches the gate that shape; this repo is the first to benefit: gatelock v0.4.1 -> v0.7.2, crdt-sync v0.5.1 -> v0.9.1. The system install was already on 0.7.1/0.9.0, so only the manifests were adrift. Python side: bandit 1.7 -> 1.9.4, mypy 1 -> 2.3.1, pylint 3 -> 4.0.7, pytest 8 -> 9.1.1, pytest-cov 4 -> 7.1.0, pytest-randomly 3 -> 4.1.0, ruff 0.8 -> 0.16.5, python-kasa 0.7 -> 0.10.2, and the rest exact-pinned. Five majors and not one lint or type finding: `scripts/ci_mirror.sh` builds a clean venv from requirements.txt and runs the whole CI set, 465 tests at 100% branch coverage. phone_app takes crdt_sync_dart v0.11.1 and the flutter_secure_storage 11 chain (compileSdk 37 / AGP 9.3.2 / Gradle 9.7.1). 79 tests green, analyzer clean, release APK builds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRykabMwPgDzFHcARoqpaK
80 lines
2.9 KiB
Plaintext
80 lines
2.9 KiB
Plaintext
import java.util.Properties
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
}
|
|
|
|
// Release signing key, kept out of the repo. CI writes key.properties from
|
|
// repository secrets; locally the file is absent and the build falls back to
|
|
// the debug key so `flutter run --release` still works. Every release APK is
|
|
// signed with the one shared key, so updates install over each other instead
|
|
// of forcing an uninstall.
|
|
val keystoreProperties = Properties().apply {
|
|
val f = rootProject.file("key.properties")
|
|
if (f.exists()) f.inputStream().use { load(it) }
|
|
}
|
|
|
|
android {
|
|
namespace = "com.kuhy.wake_alarm_sync"
|
|
// 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.
|
|
// Pinned above `flutter.compileSdkVersion` (36 on Flutter 3.47.2):
|
|
// flutter_secure_storage 11.0.0, which arrives with crdt_sync_flutter
|
|
// v0.3.1, publishes AAR metadata demanding API 37 or later. That in
|
|
// turn needs AGP > 9.1.0, which needs Gradle >= 9.5.0 -- see
|
|
// settings.gradle.kts and gradle-wrapper.properties.
|
|
compileSdk = 37
|
|
ndkVersion = flutter.ndkVersion
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
defaultConfig {
|
|
applicationId = "com.kuhy.wake_alarm_sync"
|
|
// 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
|
|
}
|
|
|
|
signingConfigs {
|
|
if (keystoreProperties.getProperty("storeFile") != null) {
|
|
create("release") {
|
|
storeFile = file(keystoreProperties.getProperty("storeFile"))
|
|
storePassword = keystoreProperties.getProperty("storePassword")
|
|
keyAlias = keystoreProperties.getProperty("keyAlias")
|
|
keyPassword = keystoreProperties.getProperty("keyPassword")
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
// Falls back to the debug key only when key.properties is absent
|
|
// (a fresh clone or a local run), so `flutter run --release` works.
|
|
signingConfig = signingConfigs.findByName("release")
|
|
?: signingConfigs.getByName("debug")
|
|
}
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|