Koin IDE Plugin
Overview
The Koin IDE Plugin is a powerful 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 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: Detect configuration issues in real time as you write your code, with errors highlighted directly in the tree. 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)
- Koin Annotations (initial support)
- Lazy Modules (initial support)
The Configuration Tree also provides:
-
Project tree search: Locate modules, components, or dependencies by focusing on the tree and typing, or using Ctrl/Cmd+F.
-
Navigation synchronization: Navigation between the Koin tree and editor is fully synchronized while preserving focus in the editor.
-
Performance Monitoring Check: Checks in real time that the Kotzilla SDK is properly configured when startKoin is called, and provides guidance to set up monitoring and debugging if the SDK is not configured.
Note: We’re actively expanding Configuration Safety coverage around 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: Provides guidance for SDK setup for Android and Kotlin Multiplatform projects and detects key environment information, including: Koin version, Kotzilla SDK version (if configured), detected package ID and Kotzilla SDK appId.
For Android apps, two setup options are provided:
- Quick Setup: A graphical wizard to automatically configure the app with the Kotzilla SDK.
- Manual Setup: A step-by-step onboarding process.
For Kotlin Multiplatform (KMP) projects, only Manual Setup is available.
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.