// core/settings — Phase 1 (M3 task 1): user settings, extracted from // :composeApp so the desktop build reads and writes the SAME preferences // file format the phone uses (`.preferences_pb`, identical keys). // // Shape follows :core:backup: plain kotlin("jvm"), package names kept at // org.incido.compose.data.settings so the Android diff is file moves only. // The one API change: SettingsRepository takes an injected // DataStore instead of a Context — Android supplies the // `preferencesDataStore(name = …)` Context-extension store, desktop builds // one with PreferenceDataStoreFactory.create(produceFile = …) (the spike // finding: the multiplatform core artifact has no Context extension). plugins { alias(libs.plugins.kotlinJvm) } java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } kotlin { jvmToolchain(17) } dependencies { // Public API (constructor + flow types) exposes DataStore — // api, not impl. On the Android classpath this resolves to the same // android variant :composeApp's datastore-preferences already pulls, so // there is no duplicate-class situation. api(libs.androidx.datastore.preferences.core) implementation(libs.kotlinx.coroutines.core) }