Back in December, we shared our roadmap for 2024, setting the stage for a year filled with new features and enhancements.
Now, as we're at the midpoint of the year, we thought we'd summarise what we’ve delivered so far and look ahead to what’s next for Koin.
Spoiler: Koin 4.0 is coming sooner than expected!
So, in December, we outlined our key focus areas for 2024:
We also announced the upcoming release of Koin 3.5.2, aimed at integrating the latest Compose Compiler and bringing a critical patch for Kotlin 1.9.21.
Since then, we’ve definitely made some strides, delivering on many of our goals and setting the stage for future developments.
One of the advancements in Koin 3.6 (Beta version) is the stabilization of lazy module loading. Previously experimental, this feature is now fully stable. It allows modules to be loaded in the background, reducing the load on the main thread and significantly improving startup times. This means your apps start faster and handle complex dependency graphs more smoothly.
Koin's performance offers significant reductions in compilation time compared to traditional DI frameworks like Dagger. Retrieval times for dependencies remain impressively low, typically between 0.005 to 0.01 milliseconds, ensuring smooth and efficient application performance.
We’ve strengthened Koin’s testability and configuration safety. The Config Verification API is now stable, providing comprehensive checks for Koin module configurations. This ensures that your dependency graphs are accurate and reliable, reducing runtime errors and enhancing development confidence.
We've improved Koin's support for Jetpack Compose, making integrating dependency injection into composable functions straightforward and efficient. Using koinInject
and koinViewModel
, you can leverage Compose’s caching system to manage the lifecycle of injected instances seamlessly.
Koin’s support for Kotlin Multiplatform (KMP) continues to improve. We’ve simplified the use of components across platforms, including better support for ViewModel and other key components. This makes it easier to share code between Android and iOS projects, maximizing code reuse and maintaining consistency across platforms. You can download a KoinxKMP Cheat Sheet 👇
Our integration with Ktor has been further refined, making Koin an excellent choice for server-side Kotlin development. Koin ensures fast and efficient dependency management in web applications, leveraging Kotlin's language features for clean and maintainable server code.
Great news! Koin 4.0 will be arriving earlier in the second half of this year, not at the end. This next-generation engine will be fully compatible with Kotlin 2.0. It will leverage Kotlin’s coroutines to improve parallel data access, enhancing performance and scalability. We’re revamping many internal components and introducing a refreshed design for Koin.
We’re working on enhancing support for constructor injection for Activities and Fragments. This will provide more flexibility and simplicity in your Android projects, making it easier to manage dependencies.
We plan to introduce job scheduler and cache manager integrations, improving how you manage and declare your KMP components in Koin. These features will streamline your development process and enhance overall efficiency.
With the release of KSP 2.0, we’re preparing Koin annotations to remain powerful and easy to use with the latest Kotlin developments. This preparation ensures that Koin stays at the cutting edge of dependency injection frameworks.
Our commitment to six-month release cycles remains strong, ensuring we stay aligned with the latest advancements in Kotlin, Android, and beyond. We’ll continue to gather and incorporate community feedback, refining our releases to meet your needs and maintain the high quality you expect from Koin.
The first half of 2024 has seen progress and exciting developments for Koin. With the stabilization of lazy module loading, and enhanced KMP integrations, we’ve laid a solid foundation for the future.
Thank you for your ongoing support and contributions. Together, we’re making Koin better and more powerful, pushing the boundaries of what’s possible with Kotlin.
Stay tuned for Koin 4.0, and we'll keep you updated with any other new features.
Happy coding!