refactor(settings): Migrate preferences from SharedPreferences to DataStore

Replace FlowPreference<T> wrapping SharedPreferences with DataStoreValue<T> wrapping AndroidX DataStore. Includes SharedPreferencesMigration for preserving existing user data, kotlinx-serialization for complex types (replacing Moshi for preferences), and comprehensive unit tests for the new infrastructure.
This commit is contained in:
darken
2026-03-04 15:23:34 +00:00
committed by Matthias Urhahn
parent 6326f4a5b9
commit a92e364ca6
55 changed files with 1083 additions and 1051 deletions
+4
View File
@@ -131,6 +131,10 @@ fun DependencyHandlerScope.addSerialization() {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:${Versions.Serialization.core}")
}
fun DependencyHandlerScope.addDataStore() {
implementation("androidx.datastore:datastore-preferences:1.1.4")
}
fun DependencyHandlerScope.addGlance() {
implementation("androidx.glance:glance-appwidget:${Versions.Glance.core}")
implementation("androidx.glance:glance-material3:${Versions.Glance.core}")