Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
dependencies ▾

Modern-Apps.git / library / room / AGENTS.md

AGENTS.md1.5 KiBRenderedCodeRaw
1# AGENTS.md — library/room/ (':library:room')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `library/room/` + allowed shared modules. Do not root-scan.
4
5- Gradle: :library:room / dir: library/room/
6- Package roots present: (pure-Kotlin Room3 + SQLCipher wiring — single package)
7- Entry files: RoomRepository.kt (no MainActivity/Route — library)
8- Deps: :library (permission-free; SqlCipherDbCodec implements base's DbBackupCodec)
9- Metadata: metadata_data/library-room.md (absent — libraries have none by design)
10- Rust: no / screenshotTest: no
11
12## Overview
13**Purpose:** Room 3 + SQLCipher wiring for every app database. Apps never call `buildDatabase()` — they subclass `RoomRepository` and apply `implementRoom(libs)`.
14**How to use:** `abstract class XxxRepository : RoomRepository` → `implementRoom(libs)` in the module build file → committed schemas under the app's `schemas/` (read single files only, never scan).
15**Entry points:** `RoomRepository.kt` → `SqlCipher.kt`.
16**Gotchas:** The literal string `androidx.room.` is lint-flagged even in comments — write `Room` in prose. Schema migrations must be tested with the actual old DB, not fresh installs.
17
18## Key files
19- com/vayunmathur/library/room/RoomRepository.kt — subclass this, never `buildDatabase()`
20- com/vayunmathur/library/room/SqlCipher.kt
21- com/vayunmathur/library/room/SqlCipherDbCodec.kt
22
23## Verify (this module only)
24```
25./gradlew :library:room:compileDevKotlin
26./gradlew :library:room:lint
27```