The server gains Train's synced `day`, `day_series` (a day's heart rate, deleted with its day) and `night`, each a sealed payload alone; the migration `days` only adds their tables, indexes and foreign keys (to their sync space, and a chunk's to its day, deferred), and the person's deletion takes them with their spaces. On Android, `LoopDays.kt` reads a band's days from a date to today, framed by the SDK's sync start and stop, into lines of JSON, then deletes on the band what the app kept up to the date it names, never today; `LoopBridge` answers `readDays` with them, one band call at a time, and `background` schedules `LoopWorker`, a WorkManager job every four hours that appends the same lines to the person's `loop_days.txt` while the app doesn't hold the band. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
64 lines
2.5 KiB
Kotlin
64 lines
2.5 KiB
Kotlin
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")
|
|
}
|
|
|
|
android {
|
|
namespace = "app.halkyon.train"
|
|
compileSdk = flutter.compileSdkVersion
|
|
ndkVersion = flutter.ndkVersion
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
defaultConfig {
|
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
|
applicationId = "app.halkyon.train"
|
|
// You can update the following values to match your application needs.
|
|
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
|
// Android 8: Health Connect's client needs it (ADR 0030, D31).
|
|
minSdk = 26
|
|
targetSdk = flutter.targetSdkVersion
|
|
// Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION
|
|
// is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions)
|
|
// You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true`
|
|
// flag during build.
|
|
versionCode = flutter.versionCode
|
|
versionName = flutter.versionName
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
// TODO: Add your own signing config for the release build.
|
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
|
signingConfig = signingConfigs.getByName("debug")
|
|
}
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|
|
|
|
dependencies {
|
|
// NotificationCompat and ServiceCompat for the recording's foreground service,
|
|
// the version Learn's build uses.
|
|
implementation("androidx.core:core:1.18.0")
|
|
// Health Connect (ADR 0030, D30, D31): AndroidX's client, no Play services.
|
|
implementation("androidx.health.connect:connect-client:1.1.0")
|
|
// The Polar Loop (ADR 0030, D32, D34): Polar's BLE SDK, under Polar's licence.
|
|
implementation("com.github.polarofficial:polar-ble-sdk:8.3.0")
|
|
// The Loop read every few hours while Train is closed (ADR 0030, D37).
|
|
implementation("androidx.work:work-runtime-ktx:2.10.1")
|
|
// The recorder's pure Kotlin parts (auto-pause) tested on the JVM.
|
|
testImplementation("junit:junit:4.13.2")
|
|
}
|