:app
Purpose: The application module — composes feature screens and supplies application-level wiring behind MainActivity and JetpackApp, and owns app-level config (signing, versioning, ProGuard).
Key APIs
| API | What it does |
|---|---|
MainActivity | Splash screen, theme resolution, POST_NOTIFICATIONS request (Android 13+), edge-to-edge, hosts JetpackApp |
JetpackApp / rememberJetpackAppState | Root composable; window size class, auth state, profile picture URI, network/crash-reporter access |
Method excerpt from MainActivity; surrounding lifecycle/theme setup and imports are omitted.
// app/src/main/kotlin/dev/atick/compose/MainActivity.kt
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.auto(
lightScrim = android.graphics.Color.TRANSPARENT,
darkScrim = android.graphics.Color.TRANSPARENT,
) { darkTheme },
navigationBarStyle = SystemBarStyle.auto(lightScrim = lightScrim, darkScrim = darkScrim) { darkTheme },
)Version calculation excerpt; update the version components when preparing a release.
// app/build.gradle.kts
val majorUpdateVersion = 1
val minorUpdateVersion = 3
val patchVersion = 0
val mVersionCode = majorUpdateVersion.times(10_000).plus(minorUpdateVersion.times(100)).plus(patchVersion)Gotchas
Important:
MainActivityextendsAppCompatActivity, notComponentActivity, to supportsetApplicationLocalesfor backward-compatible per-app language selection — the manifest setsandroid:theme="@style/Theme.AppCompat"to prevent a crash from that combination.
Theme resolution combines
isSystemInDarkTheme()withDarkThemeConfigPreferences(FOLLOW_SYSTEM/LIGHT/DARK) collected viarepeatOnLifecycle(STARTED).A release build without
keystore.propertiesfalls back to the debug signing key — see Getting Started for the full trap.
Related Documentation
Architecture — the module graph
:appsits at the top ofNavigation —
JetpackApp'sNavDisplay/NavigatorwiringData Layer — the repositories injected across feature ViewModels