YUNOVA · Android Development

Module 13: Production architecture

Notes for offline study · 3 November 2026

Clean architecture layers

Key points

  • Clean architecture splits code into UI, domain and data layers.
  • Dependencies point inward: the domain layer knows nothing about Android or the UI.
  • Use cases hold business rules; repositories hide where data comes from.

Offline-first apps with Room and sync

Key points

  • In offline-first apps the local Room database is the source of truth.
  • The UI reads from Room, and a sync job updates it from the network.
  • WorkManager can retry syncing pending changes when the network returns.

Multi-module Android projects

Key points

  • Splitting an app into Gradle modules separates features and speeds up builds.
  • Common types are app, feature, core and data modules.
  • A feature module should depend on core modules, not on other features.

Storing tokens securely and R8 shrinking

Key points

  • Keep tokens out of plain SharedPreferences; protect them with keys in Android Keystore.
  • R8 shrinks, optimises and obfuscates code in release builds.
  • Keep rules stop R8 removing classes used through reflection.