Last active
January 5, 2024 11:34
-
-
Save enginebai/f0bd5162f6162f478b4c6d1ad0aea60d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Single | |
data class KoinBridge( | |
val xxx: XXXRepository, | |
... | |
) { | |
init { | |
startKoin { | |
modules( | |
module { | |
single { xxx } | |
single { YYY } | |
... | |
} | |
) | |
} | |
} | |
val yyy by inject<YYY>() | |
} | |
@Module | |
class AppModule { | |
@Provides | |
fun provideYYY(bridge: KoinBridge) { | |
return bridge.yyy | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment