Skip to content
CAI
Software that uses CAICheck a score

aartikov/Alligator

50.5

Adequate · 22 September 2026

6k

lines of production code

Kotlin

with Java

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Alligator is an Android navigation library that manages screen transitions, state, and animations through a declarative, flow-based architecture. It provides a type-safe API for handling navigation commands, screen results, and shared element transitions, with a compiler plugin that generates navigation factories from annotations. The codebase has been modernized to Kotlin and AndroidX, offering samples that demonstrate various navigation patterns and animation capabilities.

How it got here

2017 — Kotlin migration and sample expansion

19 changes.

This period focused on modernizing the Alligator library and its associated samples by migrating Java code to Kotlin and updating to AndroidX. The team expanded the project's utility by adding new sample applications for shared element transitions and various navigation methods, while also refactoring the core navigation and screen-switching architectures to support screen results.

2018–2023 — Kotlin migration and modernization

10 changes.

The Alligator library underwent a comprehensive migration from Java to Kotlin, updating core navigation logic, exception handling, and helper classes. This period also introduced new features, including a default screen result converter and sample applications demonstrating flow-based navigation and screen switching.

Features

Add @RegisterScreen annotation for screen registration

A new @RegisterScreen annotation is introduced in the me.aartikov.alligator.annotations package. This annotation allows developers to register activities, fragments, and dialog fragments with the help of an annotation processor, specifying the associated Screen and optional ScreenResult types.

alligator/src/main/java/me/aartikov/alligator/annotations · high confidence

Add Flow Screen Switcher sample application

Introduces a new 'Flow Screen Switcher' sample application that demonstrates how to manage multiple navigation flows and switch between them using a bottom navigation bar. The sample includes UI components for two distinct flows, each containing tabs that switch between different screen states, along with the necessary Android manifest, resource files, and unit/instrumentation tests to support the feature.

flowscreenswitchersample · high confidence

Add Shared Element Transition sample with slide animations

The sharedelementanimationsample now includes a complete implementation of shared element transitions between two fragments. The sample features a first screen with two clickable images that trigger a forward transition to a second screen, utilizing slide animations (slide\_in/slide\_out for left and right directions) and Lollipop-style shared element transitions. The implementation includes the necessary layout resources, animation XMLs, and Kotlin classes to demonstrate the navigation and animation flow.

sharedelementanimationsample/src · high confidence

Added Android sample app for testing navigation methods

Added a new Android sample application (navigationmethodssample) that demonstrates navigation methods using the Alligator library. The sample includes a TestActivity and TestFragment with buttons for forward, replace, reset, and back navigation, along with transition animations and unit/instrumentation tests.

navigationmethodssample/src · high confidence

Added build configuration files for the Advanced Screen Switcher sample

The Advanced Screen Switcher sample now includes a .gitignore file to exclude build artifacts and a proguard-rules.pro file to define ProGuard optimization rules, providing a complete, ready-to-build project structure for users.

advancedscreenswitchersample · high confidence

Added configuration files for the Shared Element Transition sample

The sharedelementanimationsample directory now includes a .gitignore file to exclude build artifacts and a proguard-rules.pro file to allow for code shrinking and obfuscation, supporting the new Lollipop transition animation demo.

sharedelementanimationsample · medium confidence

Initial release of the Alligator Android navigation library

The repository has been initialized with the core components of the Alligator library, including the MIT license, Gradle wrapper scripts, and a comprehensive README detailing the library's features, setup, and API. This marks the initial public release of the Android navigation library, providing developers with the necessary files to integrate and use the library for organizing navigation code in a clean and testable way.

(repo-wide) · high confidence

Introduce Flow-based navigation sample with Kotlin and modern Android practices

The flowsample module has been migrated to Kotlin and uses a build.gradle.kts configuration. The sample demonstrates flow-based navigation using the Alligator library, featuring a MainActivity that hosts a flow fragment container. It includes two screen types: a nested flow screen (TestFlowScreen) that manages a stack of child fragments, and a small screen (TestSmallScreen) for simple navigation. The implementation includes custom transition animations (slide and fade effects) and supports navigation commands like forward, replace, reset, finish, and finishTopLevel. The sample also includes basic instrumentation and unit tests.

flowsample · high confidence

Introduce Kotlin-based animation provider interfaces and default implementations

The library now provides Kotlin source files for the animation provider interfaces (DialogAnimationProvider, TransitionAnimationProvider) and their default implementations (DefaultDialogAnimationProvider, DefaultTransitionAnimationProvider). These components allow users to customize how dialog and transition animations are selected during screen navigation, with the defaults returning standard animation types.

alligator/src/main/java/me/aartikov/alligator/animations/providers · high confidence

Introduce default screen result converter

Added a new DefaultScreenResultConverter that handles the serialization and deserialization of screen results via Android Intents. This component supports both Serializable and Parcelable types, providing a standard way to pass screen results between activities.

. · high confidence

Migrate screenresultsample to Kotlin and add image picking feature

The screenresultsample application has been migrated from Java to Kotlin, including the main activities, screen definitions, and navigation factory. A new image picking feature has been added, allowing users to select an image from the device, which is then displayed in the main activity. The sample now demonstrates handling activity results for both text input and image selection using the Alligator navigation library.

screenresultsample/src · high confidence

Behavioural changes

Add default build and ProGuard configuration files to navigation samples

The navigationmethodssample and simplenavigationsample directories now include .gitignore and proguard-rules.pro files. The .gitignore file excludes the /build directory, while the proguard-rules.pro file provides default ProGuard configuration comments and placeholders for project-specific rules, ensuring consistent build and optimization settings across the sample projects.

navigationmethodssample, simplenavigationsample · medium confidence

Added ProGuard configuration and build output exclusions for the screen results sample

The screen results sample module now includes a dedicated ProGuard rules file (proguard-rules.pro) to allow for project-specific code shrinking and obfuscation configurations, alongside a .gitignore file that excludes the build directory. These additions support the module's build and release processes.

screenresultsample · medium confidence

Added build configuration files for the alligator module

The alligator module now includes a .gitignore file to exclude build artifacts and a proguard-rules.pro file to define ProGuard optimization and obfuscation rules. These additions support the module's build process and code shrinking, ensuring that generated files are not tracked in version control and that the application's code is properly optimized for release builds.

alligator · medium confidence

Alligator exceptions migrated to Kotlin

The exception classes in the \alligator\ library's \me.aartikov.alligator.exceptions\ package have been converted from Java to Kotlin. This includes the base \NavigationException\ and specific exceptions such as \ActivityResolvingException\, \InvalidScreenResultException\, \MissingFlowFragmentNavigatorException\, \MissingFragmentNavigatorException\, \MissingScreenSwitcherException\, \NotSupportedOperationException\, \ScreenNotFoundException\, and \ScreenRegistrationException\. The change affects the internal implementation of the navigation error handling, but the public API and exception types remain the same.

alligator/src/main/java/me/aartikov/alligator/converters, alligator/src/main/java/me/aartikov/alligator/exceptions · high confidence

Annotation processor refactoring and support for screen results

The alligator-compiler module has been refactored to support generating navigation factories that handle screen results. A new \ScreenResult\ interface and \@RegisterScreen\ annotation attribute allow screens to return results. The processor now generates a \GeneratedNavigationFactory\ class that registers screens and their optional result types, enabling a more complete navigation flow for fragments and activities.

alligator-compiler · high confidence

Core navigation and screen management logic migrated to Kotlin

The core navigation framework in the \alligator\ library has been rewritten in Kotlin. This includes the \Navigator\ interface, \NavigationContext\ builder, \ScreenResolver\, and related classes like \ActivityResultHandler\ and \ScreenResult\. For users, this is a refactoring that maintains the existing API but may affect compilation if the project relies on Java-specific language features or reflection patterns previously used in the Java implementation.

alligator/src/main/java/me/aartikov/alligator · high confidence

Listeners converted to Kotlin fun interfaces

The listener interfaces in the alligator library (DialogShowingListener, NavigationErrorListener, ScreenResultListener, ScreenSwitchingListener, and TransitionListener) have been rewritten in Kotlin as functional interfaces (fun interfaces). This change modernizes the API by allowing these listeners to be implemented using lambda expressions or method references, simplifying usage for developers who integrate with the navigation and screen lifecycle events.

alligator/src/main/java/me/aartikov/alligator/listeners · high confidence

Migrate animation classes to Kotlin and update package structure

The animation classes in the \alligator/src/main/java/me/aartikov/alligator/animations\ directory have been converted from Java to Kotlin. This includes the \AnimationData\, \DialogAnimation\, \TransitionAnimation\ interfaces and their implementations (\DummyDialogAnimation\, \DummyTransitionAnimation\, \SimpleDialogAnimation\, \SimpleTransitionAnimation\). The \LollipopTransitionAnimation\ remains in Java. The package structure has been updated to reflect the new Kotlin files.

alligator/src/main/java/me/aartikov/alligator/animations · high confidence

Migrate helper classes to Kotlin

The helper classes in the alligator library (ActivityHelper, ScreenClassHelper, and ScreenResultHelper) have been rewritten in Kotlin. This change modernizes the codebase by replacing the previous Java implementation with idiomatic Kotlin, which may improve maintainability and reduce boilerplate for users of the library.

alligator/src/main/java/me/aartikov/alligator/helpers · high confidence

Migrate simplescreenswitchersample to Kotlin and AndroidX

The simplescreenswitchersample has been migrated from Java to Kotlin, with all source files renamed from .java to .kt. The sample has also been updated to use AndroidX libraries, including the AndroidX Fragment and AppCompat dependencies, and the build configuration has been converted to Kotlin DSL (KTS). This change improves code consistency and leverages modern Android development practices.

simplescreenswitchersample · high confidence

Migrate the Advanced Screen Switcher sample to Kotlin and AndroidX

The Advanced Screen Switcher sample has been migrated from Java to Kotlin and updated to use AndroidX libraries. This includes converting all source files (such as MainActivity, fragments, and screen definitions) to Kotlin, updating the AndroidManifest.xml and layout resources to use AndroidX components (like BottomNavigationView), and adding corresponding unit and instrumented tests. Users will see the sample app running on modern Android libraries with improved code maintainability.

advancedscreenswitchersample/src · high confidence

The command implementations in the \alligator\ library (including Back, Forward, Replace, Reset, SwitchTo, and Finish) have been rewritten in Kotlin. This change updates the internal structure of the navigation library, which may affect how these commands are instantiated or invoked in Java-based projects, though the functional behavior remains consistent.

alligator/src/main/java/me/aartikov/alligator/commands · high confidence

The core navigation implementations in the \alligator/navigators\ package (including \ActivityNavigator\, \FragmentNavigator\, and \DialogFragmentNavigator\ interfaces and their default implementations) have been rewritten in Kotlin. This change updates the internal structure of the library's navigation system, which may affect how navigation states and transitions are handled internally, though the public API surface remains consistent.

alligator/src/main/java/me/aartikov/alligator/navigators · high confidence

Refactor screen switching to use Screen objects and NavigationFactory

The screen switching mechanism has been refactored to operate on Screen objects rather than screen names or classes, with the FragmentScreenSwitcher now receiving a NavigationFactory to create and manage fragments. This change introduces the ScreenSwitcher interface (now in Kotlin) and updates the FragmentScreenSwitcher to work with the new destination-based architecture, allowing for more flexible screen management and animation support via AnimationData.

alligator/src/main/java/me/aartikov/alligator/screenswitchers · medium confidence

Refactored navigation factory architecture with Kotlin interface and Java implementation

The navigation factory mechanism was refactored to separate the interface from the implementation. A new Kotlin interface \NavigationFactory\ was introduced to define the contract for screen-to-Android component mapping. The existing \RegistryNavigationFactory\ was rewritten in Java to implement this interface, utilizing a \ScreenClassHelper\ for internal logic. This change improves code organization and potentially enables easier testing or alternative implementations, though the core functionality of registering activities and fragments remains similar.

alligator/src/main/java/me/aartikov/alligator/navigationfactories · medium confidence

Simple Navigation Sample migrated to Kotlin with fragment-based navigation

The Simple Navigation Sample has been migrated from Java to Kotlin, introducing a modern, fragment-based navigation architecture. The sample now utilizes the Alligator library to manage navigation between four screens (A, B, C, D), with Screen A and B implemented as Activities and Screens C and D as Fragments. The update includes a custom transition animation provider for slide-in/slide-out effects and adds an instrumentation test to verify the application context.

simplenavigationsample/src · high confidence

Dependencies

Migrate build files to Kotlin DSL and update dependencies

All Gradle build files (build.gradle) have been migrated to Kotlin DSL (build.gradle.kts). The project has been updated to use AndroidX libraries, with compileSdk and targetSdk set to 34. Dependencies have been updated, including Kotlin 1.9.21, AppCompat 1.6.1, Material 1.10.0, and the Android Gradle plugin 8.7.3. The 'alligator' and 'alligator-compiler' modules now use Kotlin DSL and have their versions set to 4.7.0.

(dependencies) · medium confidence

Upgrade Gradle to version 8.9

The Gradle wrapper has been updated to use Gradle 8.9, as specified in the new gradle-wrapper.properties file. This change ensures the project uses the latest Gradle distribution for building the Android application.

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

Score

  • CAI 48 → 50 (+2.9)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 98 → 98 (+0.6)
  • Architecture 84 → 100 (+15.6)
  • Maturity 46 → 46 (+0.0)
  • Readiness 24 → 26 (+1.4)
  • Security 100 → 100 (+0.0)

Resolved (14)

  • Change coupling clique: ActivityA.kt, ActivityB.kt, FragmentC.kt, FragmentD.kt (simplenavigationsample/src/main/java/me/aartikov/simplenavigationsample/ui/ActivityA.kt)
  • Change coupling: BackCommand.kt ↔ BackToClassCommand.kt (alligator/src/main/java/me/aartikov/alligator/commands/BackCommand.kt)
  • Change coupling: BackCommand.kt ↔ FinishCommand.kt (alligator/src/main/java/me/aartikov/alligator/commands/BackCommand.kt)
  • Change coupling: BackCommand.kt ↔ ReplaceCommand.kt (alligator/src/main/java/me/aartikov/alligator/commands/BackCommand.kt)
  • Change coupling: MainActivity.kt ↔ MessageInputActivity.kt (screenresultsample/src/main/java/me/aartikov/screenresultsample/ui/MainActivity.kt)
  • 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) (flowsample/src/main/java/me/aartikov/flowsample/ui/TestSmallFragment.kt)
  • Duplicated block (12 lines × 2) (alligator/src/main/java/me/aartikov/alligator/helpers/ScreenResultHelper.kt)
  • Duplicated block (5 lines × 2) (flowsample/src/main/java/me/aartikov/flowsample/SampleTransitionAnimationProvider.kt)
  • Duplicated block (6 lines × 3) (flowsample/src/main/java/me/aartikov/flowsample/ui/TestFlowFragment.kt)
  • No exposed public API
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (12)

  • Change coupling: ActivityA.kt ↔ ActivityB.kt (simplenavigationsample/src/main/java/me/aartikov/simplenavigationsample/ui/ActivityA.kt)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no usage examples (README.md)
  • Duplicated block (16 lines × 2) (advancedscreenswitchersample/src/main/java/me/aartikov/advancedscreenswitchersample/screens/TabScreen.kt)
  • Duplicated block (16–17 lines × 2) (alligator/src/main/java/me/aartikov/alligator/helpers/ScreenResultHelper.kt)
  • Duplicated block (22 lines × 2) (flowsample/src/main/java/me/aartikov/flowsample/ui/TestSmallFragment.kt)
  • Duplicated block (5 lines × 2) (flowsample/src/main/java/me/aartikov/flowsample/SampleTransitionAnimationProvider.kt)
  • Duplicated block (6–7 lines × 3) (flowsample/src/main/java/me/aartikov/flowsample/ui/TestFlowFragment.kt)
  • Duplicated block (7 lines × 2) (advancedscreenswitchersample/src/main/java/me/aartikov/advancedscreenswitchersample/SampleTransitionAnimationProvider.kt)
  • Duplicated block (7 lines × 2) (advancedscreenswitchersample/src/main/java/me/aartikov/advancedscreenswitchersample/ui/InnerFragment.kt)
  • Duplicated block (7 lines × 2) (advancedscreenswitchersample/src/main/java/me/aartikov/advancedscreenswitchersample/ui/TabFragment.kt)
  • No ADRs found

Architecture

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

Added bounded contexts (1)

  • alligator

Removed bounded contexts (2)

  • .
  • simplescreenswitchersample

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

Survey your own repository

aartikov/Alligator 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 22 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 0211fc0c226f992c83afeb57bd5a35aea9acd26b — 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-90d5d2fe38ee.