2.1 KiB
Module Interactions
Audit library doc. Findings come from reading source files — never from README/docs. Each pattern is one
### [slug] Titleentry (written viaaudit.sh finding), with an exemplar file. Further files that repeat a known pattern are logged withaudit.sh also, not re-described.
Scope: How modules call into each other and what data crosses each boundary. One entry per interaction (a caller module → callee module edge for one purpose), not per mechanism. "Module" means a Gradle module; in a single-module app, use the top-level feature/layer packages as the units instead.
Each entry states:
- Kind:
user-facing(triggered by a user action or feeding something on screen: a tap, a screen load, navigation, a deep link) orbackground(runs with no user on the other end: WorkManager/JobScheduler, services, receivers, sync, push, alarms, app startup init, DB/cache observers). - From → To: caller module and callee module, with the class/function on each side (
path:line). - Mechanism: direct call through an interface, suspend function, Flow/StateFlow/LiveData stream, callback, navigation route/args, Intent/PendingIntent extras, WorkManager
Data, broadcast, shared DB table/DataStore key observed by both sides, event bus, DI-provided binding. - Data passed: the concrete types in each direction (request args → result/stream type), and where it is mapped (DTO → entity → domain → UiState).
- Trigger: what starts it (user action, lifecycle event, schedule, push, connectivity, other interaction).
Look for: imports of another module's package; constructor-injected interfaces implemented in another module; @Binds/@Provides that bind an interface in one module to an implementation in another; nav routes and arguments crossing feature modules; Workers/Services calling repositories; repositories exposing Flows that UI modules collect; shared Room tables or DataStore keys written in one module and read in another; Intents/PendingIntents built in one module and handled in another; layer violations (UI module importing data-layer internals).