# Metro DI for KMP mobile: From God Objects and manually checked Singletons to Compile-Time Injection

DevFeed: [Metro DI for KMP mobile: From God Objects and manually checked Singletons to Compile-Time Injection](<https://devfeed.tech/articles/metro-di-for-kmp-mobile-from-god-objects-and-manually-checked-singletons-to-compile-time-injection-22965.md>)

Original publisher: [Read original article](<https://funkymuse.github.io/posts/metro-di-kmp-mobile/>)

Author: FunkyMuse

Published: 2026-05-24T17:30:00Z

Content type: tutorial

Language: en

Sources: [FunkyMuse](<https://devfeed.tech/sources/funkymuse.md>)

Topics: [Mobile](<https://devfeed.tech/topics/mobile.md>), [Code](<https://devfeed.tech/topics/code.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Java](<https://devfeed.tech/topics/java.md>), [Dagger](<https://devfeed.tech/topics/dagger.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [dagger](<https://devfeed.tech/tags/dagger.md>), [di](<https://devfeed.tech/tags/di.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [mobile](<https://devfeed.tech/tags/mobile.md>)

## AI overview

This article describes migrating the mobile side of the Rudio Kotlin Multiplatform project from God Objects, custom thread-safe singletons, and manually managed lazy dependencies to Metro's compile-time dependency-injection graph. It explains different startup and platform-binding requirements for Android, iOS, and JVM desktop, including Android integration with Room and platform-specific Metro hooks.

## Source excerpt

The Starting Point: God Object, Custom Singletons, and Lazy Maps In the previous article i talked about how the Ktor backend replaced a God Object BackendComponent with Metro's compile-time graph. The mobile side of Rudio had a remarkably similar story, except it was more interesting because there were actually two God Objects working together and someone (looks in the code, realizes it was me...