feat(phase-1/m2.1): :core:backup — codecs + stream-based BackupBridge

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).
This commit is contained in:
Incido Developer committed 2026-10-05 18:51:07 +13:00
1 parent b11c02e1b4
commit 7cc4eda90d
9 files changed
+262 -92

No files matched your search

+6
View File
@@ -37,6 +37,12 @@ include(":core:data-jvm")
// file is the only bridge to the phone (M2).
include(":desktopApp")
// Phase 1 (M2 task 1): the backup bridge — codecs + stream-based
// import/export, extracted from :composeApp so :desktopApp can read and
// write the SAME file format the phone produces. Plain kotlin("jvm"),
// consumed by both platforms.
include(":core:backup")
// --- Desktop feasibility spike (Development Plan §6.3, throwaway) ---
// Throwaway probes that answer "can the existing stack run on the JVM"
// before any of Phases 1-6 are committed to. They are additive: no module