8f0e156b38
DAOs on M2b's Room 3 entities and KvittDatabase v1 (schema 1.json unchanged), DTOs for every wire object and endpoint body with a round-trip test over all 80 contract examples, the Ktor client with the section 14.3.1 headers and 14.3.2 error mapping, the Keystore-encrypted token store in auth.preferences_pb, the sync engine of section 14.4 (push batches, pull pages, epoch recovery, rejections, clock skew, 401 and 426 handling) tested with MockEngine including AC-15.6, WorkManager triggers, every :core:model repository, the APK updater behind an installer interface, Coil pictures, Hilt modules, Room migration test infrastructure. Fakes: the five settled TODO(spec) comments resolved per SPEC v0.4 (settlement row in an account's ledger carries that account's allocation). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
2.1 KiB
Kotlin
49 lines
2.1 KiB
Kotlin
// :data — Room database, Ktor client, token store, sync engine, WorkManager workers, the real repositories and the APK
|
|
// updater (SPEC §6.2, §14.2, §14.4; owned by M5). Hilt modules here provide the implementations; :app (M8) binds the
|
|
// :core:model interfaces to them.
|
|
plugins {
|
|
id("kvitt.android.library")
|
|
id("kvitt.android.hilt")
|
|
alias(libs.plugins.ksp)
|
|
alias(libs.plugins.room3)
|
|
alias(libs.plugins.kotlin.serialization)
|
|
}
|
|
|
|
room3 {
|
|
schemaDirectory("$projectDir/schemas")
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":core:model"))
|
|
implementation(project(":domain"))
|
|
implementation(libs.androidx.room3.runtime)
|
|
ksp(libs.androidx.room3.compiler)
|
|
implementation(libs.androidx.sqlite.bundled)
|
|
implementation(libs.androidx.datastore.preferences)
|
|
implementation(libs.androidx.work.runtime.ktx)
|
|
implementation(libs.ktor.client.core)
|
|
implementation(libs.ktor.client.okhttp)
|
|
implementation(libs.ktor.client.content.negotiation)
|
|
implementation(libs.ktor.serialization.kotlinx.json)
|
|
implementation(libs.kotlinx.serialization.json)
|
|
implementation(libs.kotlinx.coroutines.core)
|
|
implementation(libs.kotlinx.datetime)
|
|
implementation(libs.coil)
|
|
implementation(libs.coil.network.ktor3)
|
|
|
|
testImplementation(libs.ktor.client.mock)
|
|
testImplementation(libs.kotlinx.coroutines.test)
|
|
testImplementation(libs.robolectric)
|
|
}
|
|
|
|
// Unit tests read the shared examples (SPEC §14.3.5) and the exported Room schemas (§14.2.3) in place; both are inputs,
|
|
// so a changed contract file re-runs the tests.
|
|
val contractsExamples = rootProject.layout.projectDirectory.dir("../contracts/examples")
|
|
val roomSchemas = layout.projectDirectory.dir("schemas")
|
|
tasks.withType<Test>().configureEach {
|
|
inputs.dir(contractsExamples).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("contractsExamples")
|
|
inputs.dir(roomSchemas).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("roomSchemas")
|
|
systemProperty("kvitt.contracts.examples", contractsExamples.asFile.absolutePath)
|
|
systemProperty("kvitt.room.schemas", roomSchemas.asFile.absolutePath)
|
|
}
|