Multi-Module Deep Dive

Dependency graph

:feature:attachment ──────┐
:feature:compose ─────────┤
:feature:detail ──────────┤
:feature:inbox ───────────┤
:feature:settings ────────┤
:feature:auth ────────────┤
                          ├──> :core:data ──> :core:database ──> :core:model
                          │       │                                   │
                          │       └──> :core:network ─────────────────┤
                          │       └──> :core:pgp ─────────────────────┤
                          │
:app ─────────────────────┴──> :core:designsystem ──> :core:model

Module responsibilities

:core:model — Pure library

:core:designsystem — Theme + components

:core:database — Room + SQLCipher

:core:network — Retrofit + providers

:core:data — Repository layer

:core:pgp — Encryption engine

:feature:* modules — Feature screens

Flavor distribution

Every module has a distribution flavor dimension with github and playstore variants:

Flavor-specific code lives in src/{flavor}/java/ within the module:

:core:data/src/
  main/java/.../auth/GoogleAuthHelper.kt       // interface
  github/java/.../auth/GoogleAuthHelperImpl.kt  // no-op
  playstore/java/.../auth/GoogleAuthHelperImpl.kt  // real implementation
← Architecture Data Layer →