Member-only story
Incremental Migration from Android to KMP Project — Part 1
Migration Guide From Hilt to Koin
DI migration to support Kotlin Multiplatform
Takeaway from this article
In this article, you’ll learn why we might need to migrate from Hilt to Koin with some real-time use cases. By the end of this article, you will be able to safely remove Hilt from the project.
Introduction
I’ve always been interested in trying Kotlin Multiplatform(KMM) technology, but I’ve never taken it seriously. KMM has recently gained significant momentum.
Discussions that once focused on its production readiness, library support, etc, have now been shifted to showcasing real-world applications — be it for code sharing or building full-scale apps with Compose Multiplatform. Even better KMM developer job postings in Linkdien. So I decided to get hands-on experience with Kotlin Multiplatform with one of my applications.
I’ve limited knowledge about KMM, so I decided to read about it for a while and explore existing applications. Also meanwhile start migrating libraries like Hilt which don’t support KMM to their alternatives like Koin.
Before we get any further, let’s first discuss the current tech stack of the application:
- Hilt for Dependency injection
- Retrofit for Network
- Room for Local database
- Compose for UI
- Coroutines for asynchronous work
- Coil for image loading
- Firebase for analytics and crashlytics
- Credentials Manager for authentication
- Google Drive V3 to back up the data
Now that you’re familiar with the tech stack, let’s briefly discuss the functionality. It’s a link-saver application, users can save links in the application and assign categories and tags to them. Application has Filter, and search features to easily find the links. Also, users can back up all the links to their Google Drive in case they want to switch between devices.