Skip to content
CAI
Software that uses CAICheck a score

nuhkoca/kotlin-modular-tdd-coroutines-mvvm

66.7

Weak · 22 September 2026

2.6k

lines of production code

Kotlin

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an Android application named 'KotlinTVMaze' that displays series data through a modernized architecture. It utilizes Kotlin Coroutines for asynchronous operations, Dagger 2 for dependency injection, and ViewBinding for UI management. The codebase emphasizes strict code quality through automated static analysis, formatting, and comprehensive unit and instrumentation testing.

Features

Added development and analysis automation scripts

New shell scripts have been added to support local development and repository analysis workflows. The pre-commit hook now automatically runs static analysis tools (lintDebug, ktlintCheck, detekt, spotlessApply) before allowing commits, failing the commit if issues are detected. A new script facilitates setting up the Jenkins user on macOS environments, and another script enables batch analysis of repository history using github-linguist to generate language distribution reports.

scripts · high confidence

Initialize .git-crypt configuration

Added a new \.gitattributes\ file within the \.git-crypt\ directory to establish the base encryption rules for the repository. This configuration ensures that tracked files are not filtered or diffed by Git and marks \.gpg\ files as binary, enabling the use of git-crypt for transparent file encryption.

.git-crypt · high confidence

Introduces centralized build plugin configuration for code quality and dependency management

The build system now includes a set of pre-compiled Kotlin plugins in buildSrc to standardize development workflows. This change adds configuration for Spotless (enforcing formatting and license headers for Kotlin, Java, XML, and Gradle files), KtLint (with Android rules and HTML reporting), Detekt (set to version 1.23.8 for static analysis), and Dokka (generating HTML documentation). It also introduces a dependency update task to report available upgrades while filtering out release candidates, and a git-hooks plugin to automatically install pre-commit hooks on supported operating systems.

buildSrc/src/main/kotlin/plugins · high confidence

New build utility functions for dependency stability and OS detection

Added three new Kotlin utility files to the build source: DependencyUtils provides a function to determine if a version string is non-stable based on keywords and regex; PropertyUtils exposes the user's home directory; and SystemOSUtils offers a helper to detect if the current operating system is Linux or macOS.

buildSrc/src/main/kotlin/utils · high confidence

Architecture

Refactored data layer architecture and networking configuration

The data module has been restructured to improve separation of concerns and network handling. Domain models (Series, SeriesViewItem) have been moved from the domain layer to the data layer, and the SeriesViewItem now implements AdapterItem to support UI binding directly. The repository implementation was removed in favor of direct data source usage, and the mapper now executes mapping logic on a background dispatcher using Kotlin Coroutines. Networking is significantly enhanced with the introduction of a Dagger-provided DataModule that configures Retrofit with Gson (using UPPER\_CAMEL\_CASE\_WITH\_SPACES naming), an OkHttp client with a 10MB disk cache, 60-second timeouts, and body-level HTTP logging. New extension functions for Retrofit's call factory allow delegating calls to the OkHttp client.

data/src/main · high confidence

Behavioural changes

The project now includes standardized Apache 2.0 license headers for Java and Kotlin source files. This change ensures that all new code automatically includes the correct copyright notice (attributed to nuhkoca.com) and license terms, maintaining legal compliance and consistency across the codebase.

spotless · high confidence

Base module refactored with ViewBinding, delegation adapters, and Dagger 2 migration

The base module has been significantly restructured to modernize the architecture. Dagger 2 has been integrated via a new BaseApplication extending DaggerApplication, replacing the previous BaseActivity with a new BaseModule for dependency injection. ViewBinding is now supported through a new ActivityViewBindingDelegate and a getBinding extension for ViewHolders, replacing the older DataBindingUtil usage. A new delegation-based adapter system (DelegateAdapter, DelegateAdapterManager, ItemAdapter) has been added to simplify RecyclerView item handling. Additionally, the Mapper interface now supports Kotlin Coroutines (suspend functions), and various utility extensions and UI components (like SearchTextInputEditText) have been updated to use modern APIs and fix minor bugs.

base · high confidence

Centralized application initialization and improved image binding behavior

The app's entry point (MazeApp) now extends BaseApplication instead of DaggerApplication, removing direct Timber logging setup in favor of centralized initialization. Additionally, the ImageBindingAdapter has been updated to explicitly clear Glide image requests when the bound URL is null, preventing stale image display.

app/src/main/java/com/mobilemovement/kotlintvmaze · high confidence

Code formatting and license header updates in ViewModel components

The ViewModel-related source files (MazeViewModelFactory, ViewModelKey, ViewModelModule) have been updated with Apache 2.0 license headers and standardized code formatting. This includes adding the 'SimpleRedundantLet' suppression to the factory, using imported constants for annotation targets in the key, and adjusting indentation in the module's binding method. These changes improve code compliance and readability without altering runtime behavior.

app/src/main/java/com/mobilemovement/kotlintvmaze/vm · high confidence

Introduces shared build configuration and dependency management for Android libraries

This change adds new Kotlin DSL scripts and extensions within buildSrc to standardize how child modules are built. It introduces a common Android library script that enforces Java 11, configures source sets (main, test, androidTest), sets up linting defaults, and applies baseline dependencies including Dagger and test libraries. Additionally, it provides helper extensions for dependency handling and repository configuration, allowing child modules to inherit these settings consistently.

buildSrc/src/main/kotlin/commons · high confidence

Project scaffolding and static analysis configuration

The project now includes foundational configuration files to standardize development workflows and code quality. A \.editorconfig\ file enforces consistent indentation and line endings for Kotlin and Markdown files, while \.gitattributes\ ensures correct line-ending handling and excludes specific paths from version control noise. Static analysis is configured via a \.codacy.yml\ file and an updated \default-detekt-config.yml\ that enables new rules (such as \UndocumentedPublicProperty\ and \MultiLineIfElse\) and adjusts existing ones (like disabling \Indentation\ checks in favor of ktlint/spotless). Additionally, a \CONTRIBUTING.md\ file provides developers with specific Gradle commands (\ktlintcheck\, \detekt\, \spotlessApply\) to auto-format code and resolve CI issues before submission.

(repo-wide) · high confidence

Refactor Dagger dependency injection modules and remove NetworkModule

The dependency injection setup in the app has been restructured: the NetworkModule, which previously provided Gson, OkHttpClient, and Retrofit instances, has been removed entirely. In ActivityBuilder, the MainActivity injector now explicitly declares MainActivityModule as a dependency via @ContributesAndroidInjector(modules = \[MainActivityModule::class\]), ensuring proper scoping and module binding. Additionally, license headers have been added to ActivityBuilder, BindingModule, and ContextModule, and minor formatting adjustments were applied to ContextModule.

app/src/main/java/com/mobilemovement/kotlintvmaze/di/module · high confidence

Refactor build configuration into typed Kotlin objects and new verification tasks

The build logic in buildSrc has been restructured to replace the previous flat version and classpath constants with strongly-typed Kotlin objects. Build types are now defined in BuildType.kt, where the release variant now explicitly enables test coverage (isTestCoverageEnabled = true) and uses proguard-android-optimize.txt, while the debug variant disables it. Source sets are managed via SourceSets.kt, and plugin IDs are centralized in Plugins.kt, which adds support for the kotlin-parcelize plugin and removes the deprecated android.extensions plugin. Additionally, new verification tasks (staticCheck and testAll) have been introduced to aggregate lint, ktlint, detekt, and unit/instrumented tests across subprojects, and the Modules object now provides a helper to list all project modules.

buildSrc/src/main/kotlin · high confidence

Refactor domain layer to use coroutines and dependency injection

The domain layer has been refactored to improve structure and testability. SeriesRepositoryImpl is now explicitly bound via Dagger's DomainModule, replacing the previous raw data models (SeriesRaw) with a clean Series domain model. The GetSeriesUseCase no longer depends on Android Context for error messages; instead, it uses an ErrorFactory to generate localized error strings, decoupling the domain from Android-specific resources. Additionally, the SeriesViewItemMapper now executes mapping logic within a coroutine context using DefaultDispatcherProvider, ensuring that any potential blocking operations are handled off the main thread.

domain/src/main · high confidence

Refactors UI architecture to use ViewBinding, MenuProvider, and adapter delegation

The main activity now uses ViewBinding instead of synthetic views and implements the AndroidX MenuProvider interface for menu handling, replacing the legacy support methods. The view model has been updated to expose a typed SeriesUiState instead of a generic Resource wrapper, allowing the UI to react to specific states like first-run or error more precisely. Additionally, the series list adapter has been refactored to use the DelegateAdapter pattern, simplifying view holder binding and item type management.

app/src/main/java/com/mobilemovement/kotlintvmaze/ui · high confidence

Restructured dependency injection modules

The application's dependency injection setup has been refactored to improve modularity. The main application component now includes BaseModule and DomainModule while removing the previous NetworkModule, indicating a shift in how network and domain-layer dependencies are provided. Additionally, standard Apache 2.0 license headers have been added to the affected files.

app/src/main/java/com/mobilemovement/kotlintvmaze/di/component · high confidence

Shared test utilities extracted to test-shared module

Test helper classes, including CoroutinesTestRule, LiveData extensions, and OneTimeObserver, have been moved from the app module into a new test-shared library. This change centralizes common testing infrastructure, allowing multiple modules to reuse these utilities without duplication.

test-shared · high confidence

Test coverage

Added unit tests for domain layer components; Rewrote MainViewModel tests using MockK and Coroutines Test Rule; Updated SearchInputEditTextTest with modern Kotlin conventions.

Dependencies

Android build system modernization and dependency updates

The project's build configuration has been significantly refactored to modernize the Android toolchain and update core dependencies. The Java compatibility level has been raised from 1.8 to 11, and the Android Gradle Plugin has been upgraded to version 9.4.1, accompanied by the Kotlin Gradle Plugin update to 2.4.20. The build structure now utilizes precompiled script plugins in buildSrc for centralized plugin management and versioning (Spotless 8.10.2, Ktlint 14.2.0, Detekt 1.23.8). Module-level build files have been simplified by adopting a common Android library convention, removing redundant source set and lint configurations in favor of shared defaults. Additionally, the app module now explicitly enables ViewBinding alongside DataBinding, and the data layer has been restructured to expose networking dependencies (Gson, Retrofit, OkHttp) via the API configuration.

(dependencies) · high confidence

Centralized dependency management and modernized Android library versions

The build configuration has been restructured to centralize version definitions in a new \Versions.kt\ file and migrate dependency declarations to the \androidx\ namespace. This update upgrades key libraries including Kotlin to v2.4.20, AndroidX Activity to v1.13.0, Core-KTX to v1.19.0, Material to v1.14.0, and Retrofit to v3.0.0. It also replaces the legacy \mockito-kotlin\ testing library with \mockk\ v1.14.11, removes the deprecated Leakcanary dependency, and updates the Lifecycle module to use \lifecycle-runtime\ and \lifecycle-livedata-ktx\ instead of the deprecated \lifecycle-extensions\.

buildSrc/src/main/kotlin/dependencies · high confidence

Gradle wrapper updated to version 9.7.1

The Gradle wrapper has been upgraded from version 5.1.1 to 9.7.1. This change updates the distribution URL in the wrapper properties file to fetch the new Gradle version, ensuring that builds use the latest tooling. Additionally, network timeout and distribution URL validation settings have been added to improve build reliability and security.

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 64 → 67 (+2.2)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 100 → 93 (-7.3)
  • Maturity 66 → 50 (-16.4)
  • Readiness 70 → 70 (+0.0)
  • Security 53 → 92 (+39.4)

Resolved (22)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • 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)
  • 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)
  • LLM evaluation failed
  • No exposed public API
  • …and 2 more

New (19)

  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • 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)
  • 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)
  • No ADRs found
  • Workflow token permissions not restricted

Changes since last survey

  • 15 commits — 15 feature/other, 0 fixes

By area

  • buildSrc/build.gradle.kts — 7 commits
  • .github/workflows — 4 commits
  • buildSrc/src — 2 commits
  • gradle/wrapper — 2 commits

Notable commits

  • change: Update Gradle to v9.7.0 (#310)
  • change: Update Gradle to v9.7.1 (#314)
  • change: Update Versions.okHttp to v5.5.0 (#312)
  • change: Update actions/setup-java action to v6 (#316)
  • change: Update dependency androidx.appcompat:appcompat to v1.8.0 (#311)
  • change: Update dependency com.android.tools.build:gradle to v9.3.2 (#315)
  • change: Update dependency com.android.tools.build:gradle to v9.4.0 (#318)
  • change: Update dependency com.android.tools.build:gradle to v9.4.1 (#323)
  • change: Update dependency com.diffplug.spotless:spotless-plugin-gradle to v8.10.0 (#313)
  • change: Update dependency com.diffplug.spotless:spotless-plugin-gradle to v8.10.1 (#317)
  • change: Update dependency com.diffplug.spotless:spotless-plugin-gradle to v8.10.2 (#319)
  • change: Update dependency java-jdk to v11.0.32+101 (#321)
  • change: Update dependency java-jdk to v25 (#322)
  • change: Update dependency ubuntu to v26 (#324)
  • change: Update kotlin monorepo to v2.4.20 (#320)

Architecture

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

Added bounded contexts (4)

  • app
  • base
  • data
  • domain

Removed bounded contexts (1)

  • test-shared

Added dependency edges (6)

  • app → base
  • app → data (coupling)
  • app → domain
  • data → base
  • domain → base
  • domain → data (coupling)

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

Survey your own repository

nuhkoca/kotlin-modular-tdd-coroutines-mvvm 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 63ea35ad7c15e794b74060a1a5ee33b5cf8b07ba — 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-821afab8930d.