Repository layer over Room and DataStore #5
Labels
No Label
P0
P1
P2
release-blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: null/Privacy-Period-Tracker#5
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Once
core/databaseandcore/datastoreexist, nothing should reach them directly. PRODUCT_PLAN.md §44 sets the flow as UI → ViewModel → use case / prediction engine → repository → Room / DataStore, and the repository is the seam that keeps the prediction engine ignorant of Android.Build a
CycleRepositoryand aPreferencesRepositorythat:Flows of domain types fromdomain/cycle, not Room entities — the entity is a storage detail and leaking it makes the domain module depend on Android by the back doorList<PeriodRecord>.toCycles()already exists indomain/cycle)Depends on the Room and DataStore issues in this batch. Doing it first means inventing the types twice.
Verify:
./gradlew testpasses with repository tests using an in-memory Room database, andgrep -rn "androidx.room" app/src domain/returns nothing — no module above or beside the repository imports Room.