Milestone 4. AlarmScheduler is the only AlarmManager writer; one stable PendingIntent requestCode per dose-time means re-arming replaces and can never stack (the no-drift invariant is OS-enforced). DoseAlarmReceiver handles both occurrence and escalation alarms idempotently and always re-arms the next occurrence before anything else so the chain can't break. nagCount lives in dose_log so the ~6-nag cap survives reboot. SCHEDULE_EXACT_ALARM added maxSdk 32 (USE_EXACT_ALARM is 33+ only). Emulator-verified (API 35): exact alarm armed (window=0, policy_permission), fired on time, HIGH notification with Tatt/Utsett, escalation armed +10 min, next day re-armed, Tatt → TAKEN + inventory 10→9 + escalation cancelled, reboot → BootReceiver re-armed everything. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
62 lines
1.8 KiB
Kotlin
62 lines
1.8 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
// AGP 9 has built-in Kotlin (org.jetbrains.kotlin.android is gone); only the
|
|
// compiler sub-plugins are applied separately, pinned to AGP's bundled KGP version.
|
|
alias(libs.plugins.kotlin.compose)
|
|
alias(libs.plugins.ksp)
|
|
}
|
|
|
|
ksp {
|
|
// Commit exported schemas: migration baseline for a DB that is a medical record.
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
}
|
|
|
|
android {
|
|
namespace = "no.naiv.meddetsamme"
|
|
// compileSdk 37: required by current AndroidX (core 1.19 / compose BOM 2026.05).
|
|
// targetSdk stays 35 (brief) — compile-against vs runtime-behavior are separate knobs.
|
|
compileSdk = 37
|
|
|
|
defaultConfig {
|
|
applicationId = "no.naiv.meddetsamme"
|
|
minSdk = 26
|
|
targetSdk = 35
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
// Built-in Kotlin derives jvmTarget from targetCompatibility — one knob, not two.
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
|
|
implementation(platform(libs.compose.bom))
|
|
implementation(libs.compose.ui)
|
|
implementation(libs.compose.material3)
|
|
implementation(libs.compose.ui.tooling.preview)
|
|
debugImplementation(libs.compose.ui.tooling)
|
|
|
|
implementation(libs.room.runtime)
|
|
ksp(libs.room.compiler)
|
|
|
|
testImplementation(libs.junit)
|
|
}
|