Packaging
How Cabin is distributed and how to pick only what you need. Cabin supports dual distribution from one source tree:
| Distribution | Build | Typical consumer |
|---|---|---|
| Maven AARs | Gradle | App developers, Gradle-built OEM feature apps |
| Soong modules | Android.bp in the Android / AAOS tree | SystemUI, 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.ktsandAndroid.bpper module (architecture). - Views-first on platform — SystemUI depends on Views + tokens + compliance only; Compose is not a gate (build-tree).
- Prebuilts secondary —
android_library_importof AARs is allowed for constrained vendor partitions; prefer source-in-tree for SystemUI.
Planned Maven artifacts (app / Gradle consumers)
| Artifact | Coordinate | Typical consumer |
|---|---|---|
| Tokens | dev.decoupled.cabin:cabin-tokens | Apps; OEM overlays |
| Compliance | dev.decoupled.cabin:cabin-compliance | Apps |
| Compose UI | dev.decoupled.cabin:cabin-compose | Feature apps |
| Views UI | dev.decoupled.cabin:cabin-views | Legacy / 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 name | Maps to | Platform role |
|---|---|---|
CabinTokens | cabin-tokens | Required |
CabinCompliance | cabin-compliance | Required with UI |
CabinViews | cabin-views | Primary for SystemUI / chrome |
CabinCompose | cabin-compose | Opt-in only |
Full guide: build-tree.
What is not shipped on product images
samples/*catalogwebsite- Internal screenshot test fixtures (may ship as opt-in
cabin-*-testlater)
Dependency graph (reminder)
cabin-tokens / CabinTokens
▲
cabin-compliance / CabinCompliance
▲
┌───┴───┐
compose views
cabin-compose ⊀ cabin-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 piece | Suggested Cabin content | Consumption |
|---|---|---|
| System UI APK | CabinViews + tokens + compliance | Soong |
| CarLauncher / platform media | Views and/or Compose per existing stack | Soong |
| Gradle-built bundled apps | Maven cabin-compose and/or cabin-views | Gradle |
| Vendor brand | RROs + optional token overlay module | Overlay / Soong |
Do not install the catalog app on production user images.
Anti-bloat rules
- No “umbrella” AAR or Soong meta-module that pulls both stacks and samples by default.
- SystemUI never depends on Compose, catalog, or samples.
- Optional domain packs (future) only if metrics show need — start coarse and split later carefully.
- Keep transitive deps minimal (no forcing full Material into system UI without review).
- Prefer generating resources from tokens over shipping large unused brand packs; prefer RROs over forking.