Skip to main content

Koin IDE Plugin

Overview

The Koin IDE Plugin is a powerful new tool in the Kotzilla platform, designed to enhance your development experience with the Koin framework. It helps you visualize and manage your Koin configurations and dependencies directly within Android Studio or IntelliJ IDEA. The plugin simplifies code navigation, improves configuration accuracy, and helps you catch both configuration and performance issues early in the development process.

Here are the step-by-step instructions to install the Koin IDE Plugin in Android Studio or IntelliJ.

Key Features

Configuration Tree View

The Koin Configuration Tree provides a structured visualization of your app’s dependency setup, ensuring clarity and validation throughout development. It supports:

  • Koin module organization: View all declared modules in your application, including test modules and start entries.

  • Components & dependencies: See each defined component and its dependencies, including Factories, Singletons, ViewModel definitions, and child/parameter handling.

  • Validation & configuration safety (Beta): Detect configuration issues in real time as you write your code, with errors highlighted directly in the tree. The tree also helps track static usages of Koin DSL, including startKoin / koinApplication, Classic DSL, Constructor DSL, Compose API, and Qualifier/Binding detection.

note

We’re working on extending the coverage of Configuration Safety capabilities, including support for: Koin Annotations, KMP Native expect/actual, and Koin DSL Dynamic Usages (such as Dynamic Parameters, Scopes, Lazy Modules, and Generics)

Contextual Navigation

Navigate easily between components and their configurations without leaving the IDE. The plugin integrates with your codebase to provide:

  • Source navigation: Jump between your configuration tree and source code with a single click.

  • Dependency resolution: Automatically detect argument types and resolve dependencies to help you debug effectively.

  • Koin Gutter icons: Gutter icons are displayed next to relevant lines of code, helping you navigate Koin dependencies and modules. Clicking on these icons will take you directly to the definition of the dependency.

  • Open navigation tree: Instantly open the navigation tree for quick access to the configuration and dependencies.

Koin Issues Panel

The Koin Issues Panel is designed to provide a detailed view of potential issues in your application. It is divided into two tabs:

  • Configuration issues: A dedicated view that displays warnings or potential problems in your Koin configuration, as detected by the Validation & Configuration Safety, helping you instantly identify missing dependencies or misconfigurations

  • Application issues: A real-time view of your app's performance and complexity issues, including slow startups, thread performance bottlenecks or complex dependency graphs. This feature requires the setup of the Kotzilla SDK as described here.

Why use the Koin IDE Plugin?

The Koin IDE Plugin combines Configuration Safety and Application Debugging capabilities right in your IDE:

  • Analyzes configurations in real time: Detects issues or missing declarations while you write your code.

  • Prevents runtime errors: Addresses problems early in the development process, eliminating surprises during runtime or compilation.

  • Facilitates code navigation: Use gutter icons to quickly jump between Koin components and their dependencies, eliminating the need for manual searching.

  • Debugs application issues: Provides a comprehensive view of performance and complexity problems in Kotlin apps using Koin, such as slow startup or thread bottlenecks