Skip to content
CAI
Software that uses CAICheck a score

airbnb/mavericks

63.3

Adequate · 25 September 2026

14.8k

lines of production code

Kotlin

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a state management library for Android applications, providing a framework for managing UI state through ViewModels and lifecycle-aware subscriptions. It offers core functionality for handling asynchronous data, state persistence, and navigation, along with dedicated modules for integrating with Jetpack Compose, Hilt, and Anvil dependency injection. The project also includes comprehensive testing utilities, mocking tools, and sample applications to demonstrate usage patterns.

How it got here

2018 — Initial scaffolding and core library implementation

15 changes.

This period established the foundational structure of the Mavericks project, including the initial multi-module Gradle architecture, dependency management via Version Catalogs, and the core MvRx library for state management. It also introduced comprehensive unit tests for the core components and built a sample application to demonstrate key features such as lifecycle-aware subscriptions, navigation, and data persistence.

2020–2021 — Mavericks integration and Compose support

10 changes.

This period focused on integrating the Mavericks library into the MvRx ecosystem, introducing compatibility layers and deprecating legacy classes. It also delivered initial support for Jetpack Compose and Jetpack Navigation, complete with dedicated modules, sample applications, and comprehensive test coverage.

2022 — modularization and DI integration

7 changes.

The project restructured its codebase by extracting core state management logic into a dedicated mvrx-common module and introducing mvrx-hilt for first-class Hilt dependency injection support. This period also focused on expanding developer tooling and ecosystem examples, adding comprehensive testing utilities, a debugging launcher, and multiple sample applications demonstrating integration with Dagger, Anvil, and standard Android architecture components.

Features

Add Compose sample app with navigation-scoped ViewModel support

The sample-compose module now includes a complete sample application demonstrating Mavericks with Jetpack Compose. It features a ComposeSampleActivity that showcases ViewModel scoping, specifically highlighting the difference between navigation-scoped ViewModels (tied to the NavHost lifecycle) and activity-scoped ViewModels. The sample includes an instrumentation test (ComposeTest) verifying that navigation-scoped state persists correctly across navigation actions while activity-scoped state remains independent.

sample-compose · high confidence

Add Hello World sample feature

Introduces a new Hello World sample feature, including the HelloWorldFragment, HelloWorldViewModel, and HelloWorldState, demonstrating the use of MvRx with AndroidX navigation and view binding.

sample/src/main/java/com/airbnb/mvrx/sample/features/helloworld · high confidence

Add Jetpack Navigation module v2

This change introduces a new \mvrx-navigation\ module that integrates Mavericks with Jetpack Navigation. It provides \navGraphViewModel\ to scope ViewModels to a navigation graph ID, \MavericksNavDirections\ for passing Parcelable or Serializable arguments, and \DefaultNavigationViewModelDelegateFactory\ to handle lifecycle-aware ViewModel creation within navigation back stacks. The module includes a test suite verifying ViewModel creation, restoration across activity recreation, and state sharing between fragments in a navigation graph.

mvrx-navigation · high confidence

Added Dad Joke API service interface

The sample app now includes a new network service interface, DadJokeService, which defines endpoints for searching jokes, fetching a specific joke by ID, and retrieving a random joke. This interface uses Retrofit annotations to handle HTTP requests to the dad joke API, enabling the sample app to demonstrate network integration with pagination and specific resource retrieval capabilities.

sample/src/main/java/com/airbnb/mvrx/sample/network · high confidence

Added Dad Jokes sample feature with pagination and random joke capabilities

The sample app now includes a new Dad Jokes feature demonstrating list pagination and random data fetching. Users can browse a paginated list of jokes in the Dad Joke Index screen, which handles loading states and error feedback via Snackbar, and access a separate Random Dad Joke screen that fetches and displays a single random joke on demand. The implementation uses MvRx ViewModels with constructor injection for the network service and Epoxy for efficient RecyclerView model building.

sample/src/main/java/com/airbnb/mvrx/sample/features/dadjoke · high confidence

Added Flow demo with state persistence

The sample app now includes a new 'Flow' feature demonstrating a multi-screen navigation pattern where the initial counter value is set on the intro screen and persisted across process death using the @PersistState annotation on the FlowViewModel's state.

sample/src/main/java/com/airbnb/mvrx/sample/features/flow · high confidence

Added Joke data models for sample app pagination demo

The sample app now includes data classes for the Joke API, specifically Joke and JokesResponse, to support the new pagination demo. JokesResponse includes a nextPage field and a list of Joke results, enabling the sample to demonstrate paginated data handling.

sample/src/main/java/com/airbnb/mvrx/sample/models · high confidence

Added ProGuard configuration for the sample app

The sample application now includes a dedicated ProGuard rules file (proguard-project.pro) to ensure proper code shrinking and obfuscation. This configuration preserves necessary classes and members for Kotlin reflection, RxJava, Epoxy, Retrofit, OkHttp, and Moshi, preventing runtime crashes caused by aggressive optimization while maintaining the app's reduced size and security.

sample · high confidence

Added flow-based navigation sample

A new sample demonstrating navigation using Kotlin flows has been added to the \sample-navigation\ module. It includes a \FlowNavigationActivity\ hosting a \NavHostFragment\ with a graph connecting \FlowFragmentA\ and \FlowFragmentB\. The sample showcases a shared \FlowNavigationViewModel\ across these fragments, initialized with \DefaultNavigationViewModelDelegateFactory\ in the \FlowNavigationApplication\, allowing state (a counter) to be preserved and updated as users navigate between the two screens.

sample-navigation · high confidence

Added sample app UI components for rows and marquee text

The sample application now includes new view components to demonstrate UI patterns: BasicRow and LoadingRow provide reusable list-item layouts for displaying titles, subtitles, and loading states, while Marquee introduces a scrolling text view with customizable title and subtitle properties.

sample/src/main/java/com/airbnb/mvrx/sample/views · high confidence

Initial project scaffolding and documentation

Establishes the foundational structure for the Mavericks project by adding the initial CHANGELOG.md and RELEASING.md documentation, configuring code quality tools with detekt.yml and lint.xml, and setting up the Gradle wrapper (gradlew, gradlew.bat) along with versions.properties for dependency management. This commit also updates the README.md with comprehensive usage examples and installation instructions, and configures the .gitignore and setup\_hooks scripts to support the new development workflow.

(repo-wide) · high confidence

Initial release of Mavericks Compose integration

This change introduces the \mvrx-compose\ module, providing Compose-specific extensions for Mavericks ViewModels. It adds \mavericksViewModel\ and \mavericksActivityViewModel\ composables to retrieve ViewModels scoped to the current lifecycle owner or activity, supporting custom keys and argument factories. Additionally, it exposes \collectAsState\ and \collectAsStateWithLifecycle\ functions to observe ViewModel state flows within Compose, ensuring lifecycle-aware updates and efficient recomposition.

mvrx-compose/src/main · high confidence

Introduce Mavericks Launcher module for debugging and testing views

A new \mvrx-launcher\ module has been added to provide an in-app debugging and testing interface for Mavericks views. This launcher allows developers to browse all detected Mavericks views and their available mocks, inspect mock states, and launch individual mocks in a dedicated activity to verify rendering and behavior. It includes utilities for automatic crash testing of all mocks, deeplink support to open specific views or patterns, and caching of detected views to improve startup performance.

mvrx-launcher · high confidence

Introduce Mavericks mocking module for test state injection

Adds the mvrx-mocking module, providing a system to inject mock states into Mavericks ViewModels during testing. The module introduces MockableMavericksView for defining mock variants, MockBuilder DSLs for configuring mocks (including support for up to nine ViewModels), and MockableMavericksStateStore to manage state behavior (Scriptable, Normal, Synchronous) with thread-safe updates. It also includes DataClassSetDsl for easily modifying nested data class properties in tests and replaces Kotlin reflection with Java reflection in the Setter DSL to avoid compatibility issues with certain Kotlin metadata readers.

mvrx-mocking · high confidence

Introducing the Mavericks-based Todo sample app

A new Todo application sample has been added to the repository, implementing the Google Samples Android Architecture specification using the Mavericks state management library. The app features a complete task management workflow including adding, editing, and deleting tasks, as well as filtering by status (All, Active, Completed) and viewing statistics. It utilizes Room for local data persistence, Epoxy for declarative UI building, and the Android Navigation Component for fragment transitions. The architecture employs a TasksViewModel to manage state and simulate data sources with artificial delays, while BaseFragment handles shared UI concerns like snackbars for user feedback.

sample-todo · high confidence

Mavericks core library initialization and lifecycle-aware subscriptions

The Mavericks core module is introduced, providing the foundational classes for state management in Android apps. This includes the \Mavericks\ singleton for global configuration (such as debug mode and ViewModel factories), \MavericksViewModel\ for managing state with lifecycle-aware coroutines, and \MavericksView\ for observing state changes. The library introduces \DeliveryMode\ options (\RedeliverOnStart\ and \UniqueOnly\) to control how state updates are delivered to views, ensuring that subscriptions respect the lifecycle owner (e.g., using \viewLifecycleOwner\ in Fragments) and only emit updates when appropriate. Extension functions like \fragmentViewModel\, \activityViewModel\, and \parentFragmentViewModel\ simplify ViewModel access, while \flowWhenStarted\ ensures flows only emit values when the lifecycle is started.

mvrx/src/main · high confidence

Mavericks repository and state management core extracted to mvrx-common

The core Mavericks state management and repository logic has been extracted into the new mvrx-common module. This includes the Async sealed class for representing loading, success, and failure states, the CoroutinesStateStore for managing state updates via Kotlin Flows, and the MavericksRepository for handling asynchronous data operations with built-in immutability and purity validations. The module also introduces Java reflection utilities to support Kotlin data classes in environments with incompatible kotlin-reflect versions, along with experimental API markers and test overrides to facilitate unit testing.

mvrx-common · high confidence

New Anvil sample demonstrating Anvil-based dependency injection with Mavericks ViewModels

The \sample-anvil\ module has been added to provide a reference implementation for integrating Square Anvil with the Mavericks architecture. This sample demonstrates how to use the \@ContributesViewModel\ annotation to enable constructor injection for ViewModels via Dagger, eliminating the need for manual module wiring. It includes a complete three-module structure (\sample-anvil\, \sample-anvilcodegen\, \sample-anvilannotations\) and showcases a hierarchical component setup (App, User, and Feature scopes) to illustrate how to manage dependency lifecycles and inject user-specific data into feature-scoped ViewModels.

sample-anvil · high confidence

New Anvil sample demonstrating ViewModel code generation

Added a new sample project (\sample-anvilannotations\ and \sample-anvilcodegen\) that showcases how to use the Anvil compiler plugin to automatically generate Dagger modules and assisted factories for MVVM ViewModels. The sample includes a \ContributesViewModel\ annotation and a corresponding \ContributesViewModelCodeGenerator\ that processes classes annotated with it to produce the necessary dependency injection wiring at compile time.

sample-anvilannotations, sample-anvilcodegen · high confidence

New mock generation utility for Mavericks ViewModels

A new command-line tool has been added to the \mock\_generation\ directory to generate mock state files for Mavericks ViewModels. The \MavericksMockPrinter\ script connects to a debug-enabled device via ADB, broadcasts an intent to capture the state of active ViewModels and Views, and outputs the resulting mock files to a temporary folder and the system clipboard. It supports filtering via include/exclude regexes and allows users to specify truncation thresholds for lists and strings to manage output size. The tool can also automatically copy generated mocks to a specified project module.

_mock\generation, repository · high confidence

New mvrx-hilt artifact for Hilt integration

A new 'mvrx-hilt' artifact has been added to provide first-class support for integrating Mavericks ViewModels with Hilt dependency injection. This includes an 'AssistedViewModelFactory' interface and a 'hiltMavericksViewModelFactory()' helper that allows ViewModels to be created with Hilt-managed dependencies while still supporting Mavericks' state restoration. The module also defines a custom 'MavericksViewModelScoped' scope and necessary Hilt entry points to wire the ViewModel lifecycle correctly within the Hilt component hierarchy.

mvrx-hilt · high confidence

New test utilities and sample apps for Mavericks

This change introduces the \mvrx-testing\ module, providing \MavericksTestRule\ (JUnit 4) and \MavericksTestExtension\ (JUnit 5) to simplify unit testing by allowing developers to disable lifecycle-aware observers, configure mocking behavior, and set custom coroutine dispatchers. It also adds two sample applications: \sample-counter\, a basic counter app demonstrating core Mavericks usage, and \sample-dagger\, which illustrates how to integrate Mavericks with Dagger for assisted injection of ViewModels.

(repo-wide) · high confidence

Behavioural changes

Add default ProGuard configuration for MvRx

A new proguard-rules.pro file has been added to the MvRx library to ensure compatibility with code shrinking and obfuscation tools like R8 and ProGuard. The configuration preserves critical reflection-based access patterns required by the framework, specifically keeping constructors, \create\, and \initialState\ methods on \MavericksViewModel\ subclasses and factories, maintaining companion objects that implement \MavericksViewModelFactory\, and preserving synthetic methods in Kotlin data classes used as state. This prevents runtime crashes caused by obfuscation stripping these necessary members.

mvrx · high confidence

Introduces core sample infrastructure and base classes

The sample app now includes a new core package containing base classes and application setup. A new \BaseFragment\ extends \Fragment\ and implements \MockableMavericksView\, automatically registering a mock printer on creation. A new \MvRxViewModel\ base class simplifies view model creation by handling the initial state parameter. Additionally, \MvRxApplication\ initializes the Koin dependency injection container, setting up the \DadJokeService\ with Retrofit and Moshi, and configures mock activity handling.

sample/src/main/java/com/airbnb/mvrx/sample/core · high confidence

MvRx RxJava2 module introduces Mavericks compatibility and deprecates legacy MvRx classes

The mvrx-rxjava2 module now provides a compatibility layer for the Mavericks library, introducing new base classes like BaseMvRxViewModel and BaseMvRxFragment that extend Mavericks equivalents. Legacy MvRx interfaces such as MvRxView and MvRxState are now deprecated aliases for MavericksView and MavericksState, and the MvRx object is replaced by Mavericks. The module also includes internal RxJava2 tuple support and test infrastructure updates, including a new MavericksTestRule and Robolectric configuration.

mvrx-rxjava2 · high confidence

Sample app restructured with new navigation and parent/child ViewModel demos

The sample application has been rebuilt to use AndroidX Navigation, replacing the previous layout with a LauncherActivity and MainActivity that drive a MainFragment menu. This update introduces specific demo scenarios, including a Parent/Child ViewModel pattern where a ChildFragment accesses a shared ViewModel via parentFragmentViewModel(), and a User Flow demo demonstrating data sharing across screens. The sample also now includes demos for the Mavericks Launcher, network requests with pagination, and dependency injection.

sample/src/main/java/com/airbnb/mvrx/sample · high confidence

Test coverage

Added Robolectric configuration for SDK 28; Added Robolectric configuration for test environment; Added comprehensive test coverage for MvRx core components; Added tests for Compose ViewModel integration and lifecycle scoping.

Dependencies

Migrate to Gradle Version Catalog and refreshVersions

The project has been restructured to use the Gradle Version Catalog (defined in \gradle/libs.versions.toml\) and the \refreshVersions\ plugin to centrally manage dependency versions. This change introduces a new multi-module architecture, splitting the library into distinct artifacts including \mvrx-common\, \mvrx-compose\, \mvrx-hilt\, \mvrx-mocking\, \mvrx-navigation\, \mvrx-rxjava2\, and \mvrx-testing\. Additionally, the build system now enforces Java 8 compatibility, sets the compile SDK to 33, and integrates Detekt for static analysis and Jacoco for aggregated code coverage reporting across all modules.

(dependencies) · high confidence

Updated Gradle wrapper to version 8.13

The project now uses Gradle 8.13 for builds, replacing the previous wrapper configuration. This ensures consistent build environments across development and CI by downloading the specific Gradle distribution via the wrapper.

gradle · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 42 → 63 (+21.6)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 98 → 97 (-1.6)
  • Architecture 94 → 99 (+5.4)
  • Maturity 58 → 64 (+6.2)
  • Readiness 26 → 55 (+29.4)
  • Security 37 → 62 (+25.0)

Resolved (26)

  • Coverage not measured — test suite did not build
  • Dimension evaluation failed
  • Duplicated block (77 lines × 2) (mvrx-mocking/src/main/kotlin/com/airbnb/mvrx/mocking/MockBuilder.kt)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • Medium: security finding (details withheld)
  • …and 6 more

New (38)

  • DataClassJavaReflectionKt.buildPropertyIndexMap (cognitive 32) (mvrx-common/src/main/java/com/airbnb/mvrx/DataClassJavaReflection.kt)
  • DataClassJavaReflectionKt.buildPropertyIndexMap (cyclomatic 16) (mvrx-common/src/main/java/com/airbnb/mvrx/DataClassJavaReflection.kt)
  • DataClassJavaReflectionKt.parseDataClassConstructorParamNames (cognitive 30) (mvrx-common/src/main/java/com/airbnb/mvrx/DataClassJavaReflection.kt)
  • DataClassJavaReflectionKt.parseDataClassConstructorParamNames (cyclomatic 22) (mvrx-common/src/main/java/com/airbnb/mvrx/DataClassJavaReflection.kt)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: written for insiders (docs/proguard.md)
  • Duplicated block (52 lines × 2) (mvrx-common/src/main/java/com/airbnb/mvrx/RepositoryStateContainer.kt)
  • Duplicated block (9 lines × 2) (sample/src/main/java/com/airbnb/mvrx/sample/views/BasicRow.kt)
  • FileTooLong: mocking/MockBuilder.kt (mvrx-mocking/src/main/kotlin/com/airbnb/mvrx/mocking/MockBuilder.kt)
  • Further sole-owners (lower concentration)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 18 more

Changes since last survey

  • 2 commits — 2 feature/other, 0 fixes

By area

  • (root) — 1 commit
  • mvrx-mocking/src — 1 commit

Notable commits

  • change: Make the synchronous and mockable test state stores thread-safe (#739)
  • change: Prepare for release 3.1.1 (#740)

Architecture

  • Containers 0 added · 0 removed · contexts 17 added · 0 removed · edges 31 added · 0 removed

Added bounded contexts (17)

  • mvrx
  • mvrx-common
  • mvrx-launcher
  • mvrx-mocking
  • mvrx-navigation
  • mvrx-rxjava2
  • repository
  • sample
  • sample-anvil
  • sample-compose
  • sample-counter
  • sample-dagger
  • sample-dogs
  • sample-hilt
  • sample-navigation
  • sample-todo
  • utils-view-binding

Added dependency edges (31)

  • mvrx → mvrx-common
  • mvrx-launcher → mvrx
  • mvrx-launcher → mvrx-common
  • mvrx-launcher → mvrx-mocking (coupling)
  • mvrx-mocking → mvrx
  • mvrx-mocking → mvrx-common
  • mvrx-navigation → mvrx
  • mvrx-rxjava2 → mvrx (coupling)
  • mvrx-rxjava2 → mvrx-common
  • sample → mvrx
  • sample → mvrx-common
  • sample → mvrx-mocking
  • sample-anvil → mvrx
  • sample-anvil → mvrx-common
  • sample-compose → mvrx
  • sample-compose → mvrx-common
  • sample-counter → mvrx
  • sample-counter → mvrx-common
  • sample-dagger → mvrx
  • sample-dagger → mvrx-common
  • …and 11 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

airbnb/mavericks was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 25 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 88bab77829c946ee57fe2645ea51ef1fc9d5974a — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-dd72cc24c749.