Skip to content
CAI
Software that uses CAICheck a score

airbnb/lottie-android

56.5

Adequate · 24 September 2026

30.7k

lines of production code

Java

with Kotlin

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a comprehensive Android library for rendering Lottie animations, featuring both traditional View-based and modern Jetpack Compose integrations. It provides a declarative API for loading, animating, and controlling complex vector animations with support for dynamic properties, network fetching, and performance optimization. The codebase includes a robust test suite and sample applications that demonstrate various usage patterns and edge cases.

How it got here

2016–2017 — Architecture modernization and performance refactoring

18 changes.

This period focused on modernizing the project's build infrastructure and migrating to a modular, Java 17-based Gradle configuration. Internally, the core Lottie library underwent a significant architectural overhaul, introducing new model classes, a keyframe animation system, and a content rendering hierarchy to improve performance and thread safety. These changes were accompanied by comprehensive unit testing and the removal of legacy Android scaffolding.

2018–2020 — Compose integration and architecture modernization

13 changes.

This period focused on modernizing the Lottie library's internal architecture by introducing a Moshi-based JSON parser and modularizing the parsing logic. Simultaneously, the project expanded its ecosystem by adding first-class support for Jetpack Compose, including new declarative APIs and a comprehensive sample application to demonstrate these capabilities.

2021–2024 — Compose integration and benchmarking

7 changes.

This period focused on introducing a comprehensive Compose-based sample application and issue reproduction tools to demonstrate Lottie's capabilities. The team also established baseline profile support for performance benchmarking and stabilized the Lottie Compose API for broader adoption.

Features

Add Compose-based issue repro app with image support

A new Compose-based issue reproduction application has been added to the project. This includes a new \ComposeIssueReproActivity\ that utilizes the \LottieAnimation\ Compose API to render animations, along with a sample \heart.json\ animation file. The app's manifest and resources have been updated to support this new Compose-based entry point.

issue-repro-compose · high confidence

Add Lottie Compose sample player page and UI components

The Lottie Compose sample application now includes a dedicated player page and supporting UI components. A new PlayerPage composable provides a full-featured interface for playing Lottie animations, including playback controls, speed adjustment, looping options, and a warning dialog. Supporting components like ToolbarChip and the PlayerPageState class enable interactive controls for animation settings such as outline masks, opacity, and merge paths. This change introduces the primary user-facing interface for testing and demonstrating Lottie animations within the Compose sample app.

sample-compose/src/main/java/com/airbnb/lottie/sample/compose/player · high confidence

Add LottieFiles sample page with tabbed navigation

A new LottieFiles sample page has been added to the Compose sample app, featuring a tabbed interface for browsing recent, popular, and search results. The implementation includes a main page component that manages tab selection and renders the corresponding content, along with a reusable tab bar component that animates the selected tab indicator.

sample-compose/src/main/java/com/airbnb/lottie/sample/compose/lottiefiles · medium confidence

Add utility extensions for Compose and navigation

Added three new utility files to the Compose sample app: BitmapUtils provides a helper to generate dummy bitmaps for Lottie image assets; ComposeExtensions introduces Modifier extensions for conditional backgrounds and top/bottom borders; NavigationExtensions adds a helper to decode Base64 strings from Bundle arguments.

sample-compose/src/main/java/com/airbnb/lottie/sample/compose/utils · high confidence

Added Compose UI components and theming for the sample app

The Lottie Compose sample app now includes a set of new composables and UI resources to support the Android Compose framework. This includes reusable UI components such as AnimationRow, DebouncedCircularProgressIndicator, Loader, and Marquee, alongside a complete Material Design theme configuration (colors, typography, and shapes) to style the application.

sample-compose/src/main/java/com/airbnb/lottie/sample/compose/composables · high confidence

Added Dagger integration for Lottie Compose ViewModels

The sample application now uses Dagger for dependency injection of ViewModels. New files in the dagger package define an ApplicationComponent, an AssistedViewModelFactory interface, a DaggerMavericksViewModelFactory implementation, and an AppModule that binds specific ViewModels (Showcase, LottieFilesSearch, and LottieFilesRecentAndPopular) to their respective factories, enabling the Compose sample to leverage Dagger's assisted injection for MVVM architecture.

sample-compose/src/main/java/com/airbnb/lottie/sample/compose/dagger · high confidence

Added Lottie and Lottie Compose baseline profile support

Added benchmarking infrastructure to generate and measure baseline profiles for Lottie and Lottie Compose. This includes a new \app-benchmark\ module containing a \BenchmarkActivity\ that renders a Lottie animation to exercise the hot path, along with \baselineprofile\ and \benchmark\ modules that provide the \BaselineProfileGenerator\ and \StartupBenchmarks\/\LottieBaselineProfiles\ tests. These changes enable measuring startup time and frame timing with and without baseline profiles, allowing users to verify performance improvements from profile-guided optimization.

app-benchmark, baselineprofile, benchmark · high confidence

A new ShowcasePage composable has been added to the sample-compose application. This page renders a scrollable list of featured Lottie animations using MvRx for state management, displaying each item with a title, preview, and background color. It includes a loading indicator and integrates with the application's navigation controller to navigate to the player for individual animations.

sample-compose/src/main/java/com/airbnb/lottie/sample/compose/showcase · medium confidence

Introduce Compose-specific APIs for loading and animating Lottie compositions

The Lottie Compose integration now provides a declarative API for loading and animating Lottie animations. Developers can use \rememberLottieComposition\ to load a \LottieComposition\ from various sources (raw resources, URLs, files, assets, or JSON strings) and handle loading states via the new \LottieCompositionResult\ interface. For animation playback, \animateLottieCompositionAsState\ offers a declarative way to drive animations, while \rememberLottieAnimatable\ provides an imperative API for more complex animation control. The \LottieAnimation\ composable has been updated to support dynamic properties, font remapping, and other rendering options, all integrated with Compose's state management system.

lottie-compose/src/main/java · high confidence

Introduce FontAssetManager and ImageAssetManager for font and image asset handling

Added new manager classes, FontAssetManager and ImageAssetManager, to handle font and image assets respectively. FontAssetManager manages font loading and style application, while ImageAssetManager handles image loading, including support for base64-encoded images and configurable image folders. These managers encapsulate the logic for retrieving and caching assets, improving the structure of asset management within the library.

lottie/src/main/java/com/airbnb/lottie/manager · high confidence

Introduce Lottie Compose integration and sample app

Adds the initial implementation of Lottie for Jetpack Compose, including the \LottieAnimation\ composable, \LottiePainter\, and \LottieClipSpec\ for controlling animation playback. The change also adds a new \sample-compose\ application to demonstrate and test these Compose APIs alongside the existing Android View-based sample app.

snapshot-tests · high confidence

Introduce extensible network fetching and caching for remote animations

The library now provides a pluggable network fetching and caching system for loading Lottie animations from URLs. Developers can supply a custom \LottieNetworkFetcher\ to handle HTTP requests and a \LottieNetworkCacheProvider\ to control the cache directory, allowing full integration with existing network stacks. The default implementation uses \HttpURLConnection\ and caches downloaded animations to disk, supporting JSON, ZIP, and GZIP content types.

lottie/src/main/java/com/airbnb/lottie/network · high confidence

Introduce global configuration and async updates for improved performance

Adds a new \LottieConfig\ class and \Lottie.initialize()\ method, allowing developers to globally configure the library with custom network fetchers, cache providers, and performance settings. This change introduces an \AsyncUpdates\ feature that enables off-thread animation updates for improved performance, controlled via the new configuration. Additionally, delegates for loading fonts (\FontAssetDelegate\) and images (\ImageAssetDelegate\) are introduced to allow custom asset loading.

lottie/src/main/java/com/airbnb/lottie · high confidence

Introduces new model classes for text, fonts, and keypaths

The lottie model package now includes new classes to support richer text rendering and dynamic content targeting. DocumentData and FontCharacter model text properties including justification, tracking, and box positioning, while Font and FontCharacter handle font metadata and character shapes. A new KeyPath system with a KeyPathElement interface enables dynamic property resolution and targeted animation updates. Additionally, the LottieCompositionCache now uses an LruCache with a configurable size, and the Marker class provides case-insensitive name matching to handle trailing carriage returns.

lottie/src/main/java/com/airbnb/lottie/model · high confidence

Lottie Compose API stability and new composition options

The Lottie Compose library introduces a formal API surface for the Compose integration, including the \LottieAnimation\ composable and state management classes like \LottieAnimatable\ and \LottieAnimationState\. This change establishes binary compatibility with version 6.5 and lower, ensuring stable usage in existing projects. Additionally, new composition specification types (\Asset\, \ContentProvider\, \File\, \JsonString\) and clip specifications (\Frame\, \Marker\, \Progress\) are exposed, allowing developers to load Lottie animations from various sources and define precise animation ranges.

lottie-compose/api · medium confidence

New Compose sample app with comprehensive animation examples

Added a new Compose-based sample application in the \sample-compose\ module, featuring a navigation menu and multiple example pages demonstrating Lottie's capabilities. The examples cover basic usage, animatable control (including reverse on repeat), transitions, network loading with retry signals, dynamic properties (colors, fonts, images), content scale and alignment, caching behavior, and View Pager synchronization. A shared \ExampleCard\ component and \UsageExamplePageScaffold\ are also included to structure the demo UI.

sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples · high confidence

New Compose-based sample app with navigation and preview capabilities

The sample-compose module now provides a complete Compose-based sample application. This includes a main activity with a bottom navigation bar and a NavHost routing to various example pages (BasicUsage, Animatable, Transitions, ViewPager, Network, DynamicProperties, Images, Text, ContentScale, Caching, and Player). It also introduces a PreviewPage for loading animations from assets, URLs, or files, and integrates with the LottieFiles API to fetch featured, recent, and popular animations. The application initializes Mavericks and Dagger for dependency injection.

sample-compose/src/main/java/com/airbnb/lottie/sample/compose · high confidence

New content model classes for Lottie animation elements

The lottie library introduces a new set of model classes in the \com.airbnb.lottie.model.content\ package to represent various Lottie animation elements. These include \BlurEffect\, \CircleShape\, \GradientColor\, \GradientFill\, \GradientStroke\, \LBlendMode\, \Mask\, \MergePaths\, \PolystarShape\, \RectangleShape\, \Repeater\, \RoundedCorners\, \ShapeData\, \ShapeFill\, \ShapeGroup\, \ShapePath\, \ShapeStroke\, \ShapeTrimPath\, and \TextRangeUnits\. These classes define the structure and properties of animation content, enabling the library to parse and render complex Lottie animations with support for gradients, blend modes, masks, and shape transformations.

lottie/src/main/java/com/airbnb/lottie/model/content · high confidence

New value callback and interpolation classes for dynamic animation properties

The library introduces a new set of classes in the \lottie/src/main/java/com/airbnb/lottie/value\ package to support dynamic property updates. This includes \LottieValueCallback\ and its specialized variants (\LottieInterpolatedValue\, \LottieRelativeValueCallback\ for floats, integers, and points), along with \LottieFrameInfo\ to provide frame data to callbacks. These changes enable developers to modify animation values at runtime, with specific support for relative offsets and different interpolation strategies.

lottie/src/main/java/com/airbnb/lottie/value · high confidence

Project infrastructure and documentation updates

The repository has been updated with new configuration and documentation files, including an .editorconfig for code formatting, a .gitattributes file for Git line-ending and binary file handling, and a .gitignore update to exclude more IDE and build artifacts. Additionally, the project now includes a comprehensive CHANGELOG.md and CHANGELOG\_COMPOSE.md detailing version history, alongside new files for Code of Conduct, Designer Notes, License, and Release procedures. A versions.properties file has been added to manage dependency versions, and a deploy\_snapshot.sh script was updated to use GitHub Actions for publishing snapshots.

(repo-wide) · high confidence

Removals

Removal of default Android app scaffolding

The app module's default Android scaffolding has been removed, including the main activity, its layout, styles, and associated unit and instrumentation tests. This eliminates the boilerplate 'Hello World' activity and its supporting resources, indicating the app is no longer using the standard initial template structure.

app, app/src · high confidence

Architecture

Refactor animation value parsing into dedicated parser classes

The Lottie library has reorganized its codebase by moving the parsing logic for various animatable values (such as paths, text properties, transforms, colors, and gradients) from the main composition and model classes into dedicated parser classes located in the \com.airbnb.lottie.parser\ package. This structural change, which includes new files like \AnimatablePathValueParser\, \AnimatableTextPropertiesParser\, and \AnimatableTransformParser\, separates the concerns of parsing JSON data from the model objects, making the codebase more modular and maintainable.

lottie/src/main/java/com/airbnb/lottie/parser · high confidence

Refactored animatable value types into a new package

The Lottie library has reorganized its internal model for handling animated values. All specific animatable value types (such as color, float, integer, path, point, scale, shape, and text) have been moved into a new \com.airbnb.lottie.model.animatable\ package. This change introduces a unified \AnimatableValue\ interface and a \BaseAnimatableValue\ base class to standardize how different data types are parsed and animated. For users, this is an internal refactoring that improves code structure and maintainability without changing the public API or animation behavior.

lottie/src/main/java/com/airbnb/lottie/model/animatable · high confidence

Refactored animation content rendering with new content hierarchy and interfaces

The Lottie library refactored its internal rendering architecture by introducing a new set of interfaces (Content, DrawingContent, PathContent, KeyPathElementContent) and corresponding implementation classes (e.g., BaseStrokeContent, FillContent, GradientFillContent) to manage animation content. This change restructures how shapes, strokes, and gradients are organized and drawn, enabling better separation of concerns and potentially improving performance and maintainability. The new structure supports dynamic properties and value callbacks more effectively.

lottie/src/main/java/com/airbnb/lottie/animation/content · high confidence

Refactored layer model and rendering into a new \`model.layer\` package

The internal layer architecture has been reorganized into a new \com.airbnb.lottie.model.layer\ package. This change introduces a \Layer\ data model class and a \BaseLayer\ abstract class that serves as the foundation for specific layer types (e.g., \ShapeLayer\, \TextLayer\, \ImageLayer\). The refactoring separates the layer data model from the rendering logic, allowing for cleaner handling of layer properties, animations, and effects like drop shadows and blurs within the model layer.

lottie/src/main/java/com/airbnb/lottie/model/layer · high confidence

Behavioural changes

14 commits (2 fixes) modifying After Effects Samples

A change to existing behaviour in After Effects Samples — 14 commits (2 fixs), 18 files.

After Effects Samples · medium confidence · unverified

Gradle wrapper updated to version 8.14.2

The Gradle wrapper has been upgraded from version 2.14.1 to 8.14.2. This update brings modern build tooling features and improved performance to the project's build configuration.

gradle · high confidence

Optimized paint handling to reduce memory allocations

The Lottie library introduces a custom \LPaint\ class that overrides \setAlpha\ to avoid unnecessary object allocations on older Android versions, and replaces the standard \Paint.setAlpha()\ with \setColor()\ in the animation module to improve performance.

lottie/src/main/java/com/airbnb/lottie/animation · high confidence

Refactored animation engine and rendering utilities

The animation engine has been refactored to improve performance, accuracy, and thread safety. A new \BaseLottieAnimator\ and \LottieValueAnimator\ replace the previous implementation, introducing thread-safe listener management and more accurate frame timing using \Choreographer\ and \System.nanoTime\. Rendering utilities have been reorganized, including a new \DropShadow\ class for better shadow effects and a \GammaEvaluator\ for improved color interpolation. Additionally, a customizable logging system (\LogcatLogger\, \Logger\) has been added, and utility classes like \OffscreenLayer\ and \Transform3D\ have been introduced to support advanced rendering features such as 3D transformations and offscreen compositing.

lottie/src/main/java/com/airbnb/lottie/utils · high confidence

Refactored keyframe animation system with new base classes and specialized animators

The keyframe animation logic has been restructured to improve performance and correctness. A new \BaseKeyframeAnimation\ abstract class now serves as the foundation for all keyframe animations, introducing a \KeyframesWrapper\ to optimize \setProgress()\ calls and reduce object allocations. Specialized animation classes (e.g., \ColorKeyframeAnimation\, \FloatKeyframeAnimation\, \TransformKeyframeAnimation\) have been extracted or refactored to extend this base, ensuring consistent listener notification and progress handling. This change also enables value callbacks for path keyframes and improves the accuracy of drop shadow effects.

lottie/src/main/java/com/airbnb/lottie/animation/keyframe · medium confidence

Replace LottieAnimationView JSON parsing with Moshi-based implementation

The Lottie library now uses a new Moshi-based JSON parser for processing Lottie animation files. This change introduces a suite of internal classes in the \com.airbnb.lottie.parser.moshi\ package, including \JsonReader\, \JsonUtf8Reader\, \JsonScope\, and related exception and utility classes. This replaces the previous JSON parsing mechanism, which may affect how JSON data is consumed internally, though the public API for loading animations remains unchanged.

lottie/src/main/java/com/airbnb/lottie/parser/moshi · high confidence

Fixes

Add issue reproduction activity for Lottie

A new IssueReproActivity has been added to the Lottie library, providing a dedicated Android Activity template for developers to reproduce and test issues. This activity extends AppCompatActivity and sets up a basic layout binding, serving as a starting point for bug reports and issue tracking within the library's test suite.

issue-repro/src/main/kotlin · high confidence

Test coverage

9 commits adding/updating tests in After Effects Samples/Test; Added Android UI tests for infinite and walkthrough Lottie animations; Added instrumentation tests for the sample app; Added tests for Lottie Compose animation and composition result handling; Added unit tests for core Lottie components.

Dependencies

Modernized build system with version catalogs and Java 17 toolchain

The project has been modernized by migrating to Gradle version catalogs (libs.versions.toml) and adopting a Java 17 toolchain for both Java and Kotlin compilation. This change introduces a new modular structure, separating the core Lottie library, the new Lottie Compose module, and various sample and test applications (including benchmark and snapshot tests) into distinct modules. The build configuration now enforces Java 17 compatibility and utilizes the refreshVersions plugin for dependency management, replacing the previous flat dependency declarations with a centralized catalog.

(dependencies) · 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 51 → 57 (+5.6)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 99 → 85 (-14.1)
  • Architecture 100 → 100 (-0.3)
  • Maturity 48 → 49 (+0.3)
  • Readiness 46 → 50 (+3.9)
  • Security 42 → 66 (+24.0)

Resolved (39)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (sample-compose/src/main/java/com/airbnb/lottie/sample/compose/ui/Color.kt)
  • Duplicated block (12 lines × 2) (lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt)
  • Duplicated block (12 lines × 2) (sample/src/main/kotlin/com/airbnb/lottie/samples/LottieFontViewGroup.kt)
  • Duplicated block (17 lines × 2) (sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/AnimatableExamplesPage.kt)
  • Duplicated block (17 lines × 2) (sample-compose/src/main/java/com/airbnb/lottie/sample/compose/lottiefiles/LottieFilesRecentsAndPopularPage.kt)
  • Duplicated block (7 lines × 2) (sample/src/main/kotlin/com/airbnb/lottie/samples/utils/ViewViewBindingDelegate.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)
  • High: security finding (details withheld)
  • …and 19 more

New (277)

  • AnimatableTransformParser.parse (cognitive 21) (lottie/src/main/java/com/airbnb/lottie/parser/AnimatableTransformParser.java)
  • AnimatableTransformParser.parse (cyclomatic 27) (lottie/src/main/java/com/airbnb/lottie/parser/AnimatableTransformParser.java)
  • BaseLayer.applyMasks (cognitive 26) (lottie/src/main/java/com/airbnb/lottie/model/layer/BaseLayer.java)
  • BaseLayer.applyMasks (cyclomatic 16) (lottie/src/main/java/com/airbnb/lottie/model/layer/BaseLayer.java)
  • BaseLayer.draw (cognitive 57) (lottie/src/main/java/com/airbnb/lottie/model/layer/BaseLayer.java)
  • BaseLayer.draw (cyclomatic 35) (lottie/src/main/java/com/airbnb/lottie/model/layer/BaseLayer.java)
  • BaseLayer.setProgress (cognitive 22) (lottie/src/main/java/com/airbnb/lottie/model/layer/BaseLayer.java)
  • BaseLayer.setProgress (cyclomatic 16) (lottie/src/main/java/com/airbnb/lottie/model/layer/BaseLayer.java)
  • BaseStrokeContent.addValueCallback (cognitive 19) (lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java)
  • BaseStrokeContent.applyTrimPath (cognitive 36) (lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java)
  • BaseStrokeContent.applyTrimPath (cyclomatic 20) (lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java)
  • BaseStrokeContent.draw (cognitive 30) (lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java)
  • BaseStrokeContent.draw (cyclomatic 18) (lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java)
  • BaseStrokeContent.setContents (cognitive 18) (lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java)
  • ClassTooLong: BaseLayer (lottie/src/main/java/com/airbnb/lottie/model/layer/BaseLayer.java)
  • ClassTooLong: JsonUtf8Reader (lottie/src/main/java/com/airbnb/lottie/parser/moshi/JsonUtf8Reader.java)
  • ClassTooLong: LottieDrawable (lottie/src/main/java/com/airbnb/lottie/LottieDrawable.java)
  • ClassTooLong: TextLayer (lottie/src/main/java/com/airbnb/lottie/model/layer/TextLayer.java)
  • CompositionLayer.<init> (cognitive 17) (lottie/src/main/java/com/airbnb/lottie/model/layer/CompositionLayer.java)
  • CompositionLayer.addValueCallback (cognitive 17) (lottie/src/main/java/com/airbnb/lottie/model/layer/CompositionLayer.java)
  • …and 257 more

Architecture

  • Containers 0 added · 0 removed · contexts 4 added · 0 removed · edges 1 added · 0 removed

Added bounded contexts (4)

  • lottie
  • lottie-compose
  • sample
  • sample-compose

Added dependency edges (1)

  • sample-compose → lottie-compose

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/lottie-android 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 24 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 05ea92e90381eb8a8ae06855ea2b74f322bebbec — 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-5f8d0eb43fd7.