mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
2.4 KiB
2.4 KiB
Implementation Plan - Room 3 Migration
Phase 1: Dependency Update & Build Logic Refinement
- Update
libs.versions.tomlto Room 3.0. - Update
AndroidRoomConventionPlugin.ktto align with Room 3 best practices (e.g., ensuringroom.generateKotlinis correctly set and using theandroidx.roomGradle plugin). - Verify all modules (
core:database,core:data,app, etc.) can build with the new dependencies. - Task: Update
libs.versions.tomlwith Room 3.0 and related dependencies. - Task: Refactor
AndroidRoomConventionPlugin.ktfor Room 3.0. - Task: Conductor - User Manual Verification 'Phase 1' (Protocol in workflow.md)
Phase 2: Core Database Implementation (KMP)
- Refactor
MeshtasticDatabase.ktandMeshtasticDatabaseConstructor.ktto use the new Room 3RoomDatabase.Builderfor KMP. - Configure the
BundledSQLiteDriverincommonMainto ensure consistent SQL behavior across all targets. - Ensure that DAOs and Entities are using
room-runtimeincommonMaincorrectly. - Implement platform-specific database setup for Android, Desktop, and iOS in their respective
Mainsource sets. - Task: Refactor
MeshtasticDatabase.ktfor Room 3.0 KMP APIs. - Task: Configure
BundledSQLiteDriverinDatabaseProvider.kt. - Task: Implement platform-specific database path logic for Desktop and iOS.
- Task: Conductor - User Manual Verification 'Phase 2' (Protocol in workflow.md)
Phase 3: Multi-target Support (iOS)
- Add iOS targets (
iosX64,iosArm64,iosSimulatorArm64) tocore:database/build.gradle.kts. - Configure the database file path logic for iOS.
- Verify that the
core:databasemodule compiles for iOS. - Task: Add iOS targets to
core:database/build.gradle.kts. - Task: Verify iOS compilation (Skipped: Linux host).
- Task: Conductor - User Manual Verification 'Phase 3' (Protocol in workflow.md)
Phase 4: Verification and Testing
- Update existing database tests in
commonTest,androidHostTest, andandroidDeviceTestto Room 3. - Run tests on Android and Desktop to ensure no regressions in behavior.
- Perform manual verification on Android and Desktop apps to ensure the database initializes and functions correctly.
- Task: Update and run DAO unit tests in
commonTest. - Task: Run Android instrumented tests (
androidDeviceTest). - Task: Manual verification on Desktop.
- Task: Conductor - User Manual Verification 'Phase 4' (Protocol in workflow.md)