Skip to content

Instantly share code, notes, and snippets.

@enginebai
Last active January 5, 2024 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enginebai/f0bd5162f6162f478b4c6d1ad0aea60d to your computer and use it in GitHub Desktop.
Save enginebai/f0bd5162f6162f478b4c6d1ad0aea60d to your computer and use it in GitHub Desktop.
@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