feat(phase-1/m3.1): :core:settings — SettingsRepository shared, store injected
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).
This commit is contained in:
1 parent
561d16eb0c
commit
8db835640e
10 files changed
+131
-30
No files matched your search
@@ -198,6 +198,10 @@ dependencies {
|
||||
// viewer + the list card thumbnails). It's the *interface* in
|
||||
// :core:domain, not the impl, so this stays clean of ObjectBox.
|
||||
implementation(project(":core:domain"))
|
||||
// Phase 1 (M3 task 1): same reason for SettingsRepository — MainActivity
|
||||
// reads userSettingsFlow / snapshot() and its type moved with the class
|
||||
// into the shared :core:settings module.
|
||||
implementation(project(":core:settings"))
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
// v0.3.2.0: MainActivity now extends FragmentActivity so the
|
||||
|
||||
Reference in new issue
Block a user