Skip to main content

Packaging

How Cabin is distributed and how to pick only what you need. Cabin supports dual distribution from one source tree:

DistributionBuildTypical consumer
Maven AARsGradleApp developers, Gradle-built OEM feature apps
Soong modulesAndroid.bp in the Android / AAOS treeSystemUI, CarLauncher, platform media, vendor chrome

Coordinates and Soong names below are planned.

Platform / SystemUI: do not consume Cabin via Gradle implementation(...). Use Soong module dependencies after syncing Cabin into the tree. See build-tree and soong.

Dual distribution

same Kotlin / Java / resources

┌───────────────┴───────────────┐
▼ ▼
Gradle (Maven AAR) Soong (android_library)
cabin-tokens / -compliance CabinTokens / CabinCompliance
cabin-views / -compose CabinViews / CabinCompose
│ │
▼ ▼
App developers SystemUI / build-tree
  • One source of truth — co-locate build.gradle.kts and Android.bp per module (architecture).
  • Views-first on platform — SystemUI depends on Views + tokens + compliance only; Compose is not a gate (build-tree).
  • Prebuilts secondaryandroid_library_import of AARs is allowed for constrained vendor partitions; prefer source-in-tree for SystemUI.

Planned Maven artifacts (app / Gradle consumers)

ArtifactCoordinateTypical consumer
Tokensdev.decoupled.cabin:cabin-tokensApps; OEM overlays
Compliancedev.decoupled.cabin:cabin-complianceApps
Compose UIdev.decoupled.cabin:cabin-composeFeature apps
Views UIdev.decoupled.cabin:cabin-viewsLegacy / Views apps built with Gradle

Group ID dev.decoupled.cabin is illustrative and may be finalized at first publish.

Planned Soong modules (build-tree consumers)

Soong nameMaps toPlatform role
CabinTokenscabin-tokensRequired
CabinCompliancecabin-complianceRequired with UI
CabinViewscabin-viewsPrimary for SystemUI / chrome
CabinComposecabin-composeOpt-in only

Full guide: build-tree.

What is not shipped on product images

  • samples/*
  • catalog
  • website
  • Internal screenshot test fixtures (may ship as opt-in cabin-*-test later)

Dependency graph (reminder)

cabin-tokens / CabinTokens

cabin-compliance / CabinCompliance

┌───┴───┐
compose views

cabin-composecabin-views (no dependency either way). Same rule for CabinCompose / CabinViews.

Selecting modules — Gradle (apps)

Compose-only app

implementation("dev.decoupled.cabin:cabin-compose:<version>")

Views-only app (Gradle-built)

implementation("dev.decoupled.cabin:cabin-views:<version>")

Use this for application modules that still use Views and are built with Gradle. For SystemUI and other AOSP build-tree targets, use Soong instead — build-tree.

OEM overlay library (Gradle)

implementation("dev.decoupled.cabin:cabin-tokens:<version>")
// optionally: compliance if overlay ships default policies

Full cabin feature with chrome previews (apps)

implementation("dev.decoupled.cabin:cabin-compose:<version>")
implementation("dev.decoupled.cabin:cabin-views:<version>")

Use sparingly in a single APK; prefer split across system vs app partitions.

Selecting modules — Soong (platform)

// Planned — SystemUI / chrome: thin Views path only
static_libs: [
"CabinTokens",
"CabinCompliance",
"CabinViews",
]

Do not add CabinCompose, catalog, or samples to SystemUI. Details and manifest sync: build-tree.

Versioning (planned)

  • SemVer once stable (Maven).
  • Platform pins Cabin via repo manifest revision/tag.
  • Compliance + tokens may version independently but UI releases declare compatible token/compliance ranges.
  • Document breaking token renames prominently — tokens are the long-term contract.

AAOS image considerations

Partition / image pieceSuggested Cabin contentConsumption
System UI APKCabinViews + tokens + complianceSoong
CarLauncher / platform mediaViews and/or Compose per existing stackSoong
Gradle-built bundled appsMaven cabin-compose and/or cabin-viewsGradle
Vendor brandRROs + optional token overlay moduleOverlay / Soong

Do not install the catalog app on production user images.

Anti-bloat rules

  1. No “umbrella” AAR or Soong meta-module that pulls both stacks and samples by default.
  2. SystemUI never depends on Compose, catalog, or samples.
  3. Optional domain packs (future) only if metrics show need — start coarse and split later carefully.
  4. Keep transitive deps minimal (no forcing full Material into system UI without review).
  5. Prefer generating resources from tokens over shipping large unused brand packs; prefer RROs over forking.