Integration
How to add Cabin to an existing AAOS image or application repository with minimal footprint. Artifacts below are planned.
Choose your slice
| Goal | Depend on | Build |
|---|---|---|
| Brand tokens only (custom UI) | cabin-tokens / CabinTokens | Gradle or Soong |
| Compose app | cabin-compose (+ tokens/compliance) | Gradle (typical) |
| Views app (Gradle-built) | cabin-views (+ tokens/compliance) | Gradle |
| SystemUI / CarLauncher / platform media | CabinViews + CabinTokens + CabinCompliance | Soong — see build-tree |
| Dual UI in one product | Both UI stacks; still no samples/catalog | Prefer split by partition |
See packaging and architecture.
Platform / build-tree apps
SystemUI, CarLauncher, platform media, and other AOSP targets use Soong
(Android.bp), not Gradle implementation(...).
- Sync Cabin into the Android tree via repo manifest (e.g.
external/cabin). - Depend on planned Soong modules:
CabinTokens,CabinCompliance,CabinViews(Views-first; Compose is not required for SystemUI). - Brand with RROs and optional token overlay modules — do not fork Cabin core.
Full guide: build-tree · engineering notes: soong.
Planned Gradle setup (app developers)
App / Compose module
// Planned
dependencies {
implementation("dev.decoupled.cabin:cabin-compose:<version>")
}
// Planned usage
setContent {
CabinTheme(tokens = OemOverlay.toCabinTokens()) {
MediaNowPlaying(state = state, onAction = viewModel::onAction)
}
}
Views module (Gradle-built apps only)
// Planned — for app modules still on Views, built with Gradle
dependencies {
implementation("dev.decoupled.cabin:cabin-views:<version>")
}
<application android:theme="@style/Theme.Cabin">
Theme Kit resolves token roles; OEM overlays / RROs brand without forking — theme-kit. For SystemUI and other build-tree targets, use Soong — not this Gradle block.
Wire vehicle state
Cabin does not replace Car APIs. Provide an adapter:
// Planned product code
fun CarUxRestrictions.toVehicleUiState(): VehicleUiState = /* map */
Inject the resulting compliance policy into theme/host.
OEM overlay
- Apps (Gradle): theme overlay remapping
cabin_colorPrimary(etc.), or a thin module depending only oncabin-tokens. - Platform (Soong): prefer RROs + optional
OemCabinTokens-style module (build-tree, RRO sketch). - Map brand colors/type to semantic roles at the theme boundary — not inside feature screens.
- Keep safety semantic locks intact (tokens).
Full Theme Kit guide: theme-kit.
Minimal footprint checklist
- No dependency on
samplesorcatalog - Only one UI stack unless both are required
- Token overlay / RRO isolated from Cabin core
- R8/shrinking enabled in Gradle apps; verify Cabin consumer rules (future)
- SystemUI uses Soong Views path only (no Compose, no Gradle AARs required)
- System image packages Views chrome separately from app APKs
Existing Material / AAOS widgets
You can adopt Cabin incrementally — see migration.
Verification
- Day/night smoke test
- Driving restriction fixture test on one screen
- Touch target visual QA on target hardware density
- Font scale large
- Platform: confirm SystemUI bp deps stay thin (build-tree)