https://kotlinlang.org logo
#koin
Title
# koin
l

Lilly

07/07/2022, 4:28 PM
How to handle a scope across multiple koin modules or even gradle modules? Example: I have a screen that utilizes bluetooth api to scan for devices. When connected with a device the user is redirected to a dashboard screen where I want to create a
scope(named("CONNECTED")) {  }
. Every definition should live in this scope. But the definitions are spread across multiple gradle modules. Any guidelines for this kind of use case?
c

curioustechizen

07/07/2022, 6:37 PM
I had a similar situation but it was not about scopes. Rather, is was just about injecting a named dependency. I ended up creating an interface in a shared module and using that.
Copy code
interface ConnectedNamedQualifier
named<ConnectedNamedQualifier>(){}
👍 1
a

arnaud.giuliani

07/13/2022, 3:49 PM
good one