Repository navigation
Why five Gradle modules, Room as the only source of data, and no Hilt in the Android app? #613
|
I want to add a feature to the Android app and need to know which module the code goes in. The data flow and the dependency wiring also look unusual: everything reads from Room, and there is a hand-written |
Replies: 1 comment
|
The app has five modules, split where a split brings a benefit (
Room is the single source of truth, and the network only fills it. Every screen and the widget read Room (and DataStore), never a response, so the app works offline and the widget keeps counting down with no signal. There are two databases:
There is no Hilt, on purpose:
Instead,
The cost: a missing More: https://github.com/lumenpearson/lessons/blob/main/docs/architecture.md#the-android-app and https://github.com/lumenpearson/lessons/blob/main/docs/architecture.md#what-we-took-from-essentials-and-what-we-changed |
The app has five modules, split where a split brings a benefit (
android/settings.gradle.kts)::core:modelis pure JVM Kotlin: the domain types,ScheduleEngineandAlertPlanner. It has no Android SDK, so its tests run in milliseconds with no emulator. Keep Android imports out of it.StabilityPromiseTestalso fails on anyvarthere, becausecompose-stability.confpromises the Compose compiler that the package is stable.:core:designsystemholds the theme, the typography and the Compose components.:core:dataholds Room (two databases), Retrofit, the repositories, sync and notifications.:widgetis the Glance widget, a module of its own so that it reaches the cached timetable without a depe…