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, inline modules declared inside startKoin or koinApplication blocks, and start entries.
-
Components & dependencies: See each defined component and its dependencies, including Factories, Singletons, ViewModel definitions, scoped components, and dynamic parameters.
-
Validation & configuration safety (Beta): Detect configuration issues in real time as you write your code, with errors highlighted directly in the tree. Enhanced checks include support for:
- Classic DSL
- Constructor DSL
- Ktor DSL
- Compose API
- Qualifier / Binding detection
- Usages inside declarations
- Dynamic parameter support
- Generics
- Scoped usages (initial support)
Note: We’re actively expanding Configuration Safety coverage to include Koin Annotations, Kotlin Multiplatform Native expect/actual, Lazy Modules, and advanced scope usages.
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, including dynamic parameters, 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. You can customize which icons to show usage, declaration, parameter icons and restrict icons to constructor usage if desired.
-
Open navigation tree: Instantly open the navigation tree for quick access to the configuration and dependencies.
-
Dynamic inspections toggling: Enable or disable specific inspections like unused definitions or undeclared usages directly from the UI.
Koin Inisghts View
The Koin Insights View is designed to provide a detailed view of potential issues in your application. It is divided into three 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 before runtime
-
Application issues: A real-time view of your app's performance, architectural issues and crashes, including slow startups, ANR's due to thread performance bottlenecks or complex dependency graph resolutions. This feature requires the setup of the Kotzilla SDK as described here.
-
Kotzilla Flight Check: Automatically detects key information about your environment, including Koin version, Kotzilla SDK version (if configured), detected package ID and Kotzilla SDK appId.
If the Kotzilla SDK is not configured, this tab guides you to follow the appropriate configuration guides for Android, Kotlin Multiplatform (KMP), and SDK libraries. Android users also benefit from an automatic configuration wizard to streamline setup.
Why use the Koin IDE Plugin?
The Koin IDE Plugin integrates Configuration Safety, Application Debugging, and Performance Monitoring right into your IDE, streamlining your development workflow with Koin:
-
Analyzes configurations in real time: Detect issues and missing declarations instantly as you write your code.
-
Prevents runtime errors: Catch problems early in development to avoid surprises during compilation or runtime.
-
Facilitates code navigation: Use customizable gutter icons to quickly jump between Koin components, modules, and dependencies.
-
Fix performance issues: Gain real-time insights into app performance, architectural issues, and bottlenecks with comprehensive diagnostics powered by the Kotzilla SDK.