Milestone M3 task 1 (DESKTOP_PHASE_PLAN §5): move UserSettings +
SettingsRepository into a plain kotlin("jvm") module so the desktop
build reads/writes the SAME preferences keys and .preferences_pb format
the phone uses. Package name org.incido.compose.data.settings kept, so
the Android diff is file moves + one constructor change.
Seam: SettingsRepository now takes an injected DataStore<Preferences>.
Android supplies the preferencesDataStore(name = "incido_settings")
Context-extension store (new AndroidSettingsStore.kt, moved verbatim);
desktop builds it with PreferenceDataStoreFactory.create(
corruptionHandler = ReplaceFileCorruptionHandler, produceFile) — the
Phase-0 API delta (no Context extension on the multiplatform core
artifact). snapshot() keeps runBlocking for startup-only use.
DesktopContainer grows settingsRepository first, mirroring AppContainer
construction order ahead of M3's cipher install. dynamic_color /
use_biometric / block_screenshots keys ride along but have no desktop
UI — hidden, not faked (M3 exit rule).
Verified: ./gradlew assembleDebug (green; :app needed :core:settings on
its classpath — MainActivity reads userSettingsFlow, same pattern as
:core:domain) + ./gradlew :desktopApp:run --args="--data-dir
/tmp/incido-desktop-smoke --self-test --exit-after 6" (RENDER/SELFTEST
sequence intact) + ./gradlew :core:data-jvm:smoke (green).
59 lines
2.1 KiB
Kotlin
59 lines
2.1 KiB
Kotlin
pluginManagement {
|
|
repositories {
|
|
google {
|
|
content {
|
|
includeGroupByRegex("com\\.android.*")
|
|
includeGroupByRegex("com\\.google.*")
|
|
includeGroupByRegex("androidx.*")
|
|
}
|
|
}
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
}
|
|
}
|
|
|
|
dependencyResolutionManagement {
|
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
|
|
rootProject.name = "incido"
|
|
|
|
include(":app")
|
|
include(":composeApp")
|
|
include(":core:domain")
|
|
include(":core:data")
|
|
// Phase 1 (M1a): the desktop build of the same data layer. It compiles
|
|
// :core:data's platform-neutral sources against the JVM ObjectBox runtime —
|
|
// see core/data-jvm/build.gradle.kts for why this is a sibling module and not
|
|
// a multiplatform one.
|
|
include(":core:data-jvm")
|
|
|
|
// Phase 1 (M1b): the desktop application — a Compose Multiplatform window over
|
|
// :core:data-jvm. Owns its own library (XDG data dir); the encrypted backup
|
|
// 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")
|
|
|
|
// Phase 1 (M3 task 1): user settings, same extraction logic as :core:backup.
|
|
// SettingsRepository now takes an injected DataStore<Preferences>; Android
|
|
// supplies the Context-extension store, the desktop build a file-based one —
|
|
// both producing the same `.preferences_pb` format, same keys.
|
|
include(":core:settings")
|
|
|
|
// --- 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
|
|
// above is touched, and nothing outside `spike/` depends on them.
|
|
// See tools/DESKTOP_FEASIBILITY.md for the findings + how to delete these.
|
|
include(":spike:data-jvm")
|
|
include(":spike:compose-jvm")
|