Phase 1 M2 task 1 (tools/DESKTOP_PHASE_PLAN.md §4): extract the backup
bridge from :composeApp into a plain kotlin("jvm") module so the desktop
build can import/export the phone file format.
- git mv BackupCodec / EncryptedBackupCodec / EncryptedKeyCodec into
core/backup, keeping the org.incido.compose.data.backup package so the
Android diff is file moves + one dependency line (no import churn).
- New BackupBridge: the four BackupManager operations over
InputStream/OutputStream instead of Uri (incl. the v0.3.3.3 preview
hotfix catches); BackupPreview moves with it, same package.
- BackupManager stays in :composeApp as a thin Uri -> stream SAF shim,
public API unchanged. Dedupe = task 3, desktop picker UI = task 2.
Verification passed: ./gradlew :core:backup:build :core:data-jvm:smoke
:spike:data-jvm:run + assembleDebug + :desktopApp:run --args="--data-dir
/tmp/incido-desktop-smoke --self-test --exit-after 6" — all green; run
output recorded in tools/DESKTOP_FEASIBILITY.md (Phase 1 status).
81 lines
2.5 KiB
Kotlin
81 lines
2.5 KiB
Kotlin
// composeApp — Android UI module hosting all screens, ViewModels, theme,
|
|
// navigation, and the manual DI container. Regular Android Compose (not
|
|
// Compose Multiplatform) is used in v0.1 to keep the build simple; the
|
|
// migration path to Multiplatform in v0.2 is a module-level refactor.
|
|
|
|
plugins {
|
|
alias(libs.plugins.androidLibrary)
|
|
alias(libs.plugins.kotlinAndroid)
|
|
alias(libs.plugins.kotlinCompose)
|
|
// v0.3.2.0 — Kotlin Serialization for the Backup JSON codec.
|
|
alias(libs.plugins.kotlinSerialization)
|
|
}
|
|
|
|
android {
|
|
namespace = "org.incido.compose"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
minSdk = 26
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
buildConfig = true
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":core:domain"))
|
|
implementation(project(":core:data"))
|
|
// Phase 1 (M2 task 1): backup codecs + bridge now live here; the
|
|
// org.incido.compose.data.backup package name was kept, so no imports
|
|
// changed — only this dependency line.
|
|
implementation(project(":core:backup"))
|
|
|
|
// Core / lifecycle
|
|
implementation(libs.androidx.core.ktx)
|
|
implementation(libs.androidx.lifecycle.viewmodel)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
implementation(libs.androidx.lifecycle.runtime)
|
|
implementation(libs.androidx.lifecycle.process)
|
|
implementation(libs.kotlinx.coroutines.android)
|
|
|
|
// Compose BOM keeps all Compose artefact versions aligned
|
|
val composeBom = platform(libs.composeBom)
|
|
implementation(composeBom)
|
|
androidTestImplementation(composeBom)
|
|
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.navigation.compose)
|
|
|
|
// Compose
|
|
implementation(libs.compose.ui)
|
|
implementation(libs.compose.ui.tooling.preview)
|
|
implementation(libs.compose.foundation)
|
|
implementation(libs.compose.material3)
|
|
implementation(libs.compose.material.icons.extended)
|
|
debugImplementation(libs.compose.ui.tooling)
|
|
|
|
// v0.3.2.0 — Settings (DataStore Preferences), Security (Biometric),
|
|
// and Backup (Kotlin Serialization JSON) support.
|
|
implementation(libs.androidx.datastore.preferences)
|
|
implementation(libs.androidx.biometric)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
}
|