Skip to main content

Integration

How to add Cabin to an existing AAOS image or application repository with minimal footprint. Artifacts below are planned.

Choose your slice​

GoalDepend onBuild
Brand tokens only (custom UI)cabin-tokens / CabinTokensGradle or Soong
Compose appcabin-compose (+ tokens/compliance)Gradle (typical)
Views app (Gradle-built)cabin-views (+ tokens/compliance)Gradle
SystemUI / CarLauncher / platform mediaCabinViews + CabinTokens + CabinComplianceSoong — see build-tree
Dual UI in one productBoth UI stacks; still no samples/catalogPrefer 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(...).

  1. Sync Cabin into the Android tree via repo manifest (e.g. external/cabin).
  2. Depend on Soong modules (CabinTokens, CabinCompliance, CabinViews) — Views-first; Compose is not required for SystemUI. Copy from systemui-cabin sketch.
  3. 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​

  1. Apps (Gradle): theme overlay remapping cabin_colorPrimary (etc.), or a thin module depending only on cabin-tokens.
  2. Platform (Soong): prefer RROs + optional OemCabinTokens-style module (build-tree, RRO sketch).
  3. Map brand colors/type to semantic roles at the theme boundary — not inside feature screens.
  4. Keep safety semantic locks intact (tokens).

Full Theme Kit guide: theme-kit.

Minimal footprint checklist​

  • No dependency on samples or catalog
  • 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)