refactor(data): address occurrences by (taskId, occurrenceStart)
Phase 0 of docs/OWN-STORE.md. Prepares the seam for the Room store while the provider is still the store. Task.id (the materialised instance row id) is gone; Task carries occurrenceStart, its RECURRENCE-ID anchor, instead. updateInstance takes (taskId, occurrenceStart, form) and AndroidTasksDataSource maps that back to an instance row itself, so the provider path exercises the new signature before Room exists. Lazy-list keys move to Task.occurrenceKey. Two occurrences of one series can appear in the same list once expansion is ours, and taskId alone would collide there. domain/Models.kt stops importing TasksContract — status, priority and local-account constants now live in domain. StorageMode gains OWN as a third value; LOCAL keeps meaning the dmfs provider until it is deleted. Room 2.8.4 and room.schemaLocation added to the build.
This commit is contained in:
@@ -137,6 +137,13 @@ kotlin {
|
||||
}
|
||||
}
|
||||
|
||||
// Export each Room schema version to app/schemas/ and commit it. That JSON is
|
||||
// what MigrationTestHelper reads to build an old database and migrate it, so
|
||||
// without it a migration can only be tested by hand.
|
||||
ksp {
|
||||
arg("room.schemaLocation", "$projectDir/schemas")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Agendula's own task store — the dmfs provider vendored under our authority.
|
||||
// Contributes a <provider> to the merged manifest; no app code imports from it
|
||||
@@ -162,6 +169,10 @@ dependencies {
|
||||
implementation(libs.androidx.navigation.compose)
|
||||
ksp(libs.hilt.compiler)
|
||||
|
||||
implementation(libs.androidx.room.runtime)
|
||||
implementation(libs.androidx.room.ktx)
|
||||
ksp(libs.androidx.room.compiler)
|
||||
|
||||
implementation(libs.androidx.datastore.preferences)
|
||||
implementation(libs.androidx.documentfile)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user