electrolobzik
01/17/2024, 11:46 AMromainbsl
01/17/2024, 12:04 PMelectrolobzik
01/17/2024, 12:06 PMromainbsl
01/17/2024, 12:07 PMelectrolobzik
01/17/2024, 12:16 PMromainbsl
01/17/2024, 12:19 PMelectrolobzik
01/17/2024, 12:38 PMelectrolobzik
01/17/2024, 12:39 PMelectrolobzik
01/17/2024, 12:41 PMromainbsl
01/17/2024, 12:45 PMelectrolobzik
01/17/2024, 12:46 PMA new function includes() is available in the Module class, which lets you compose a module by including other modules in an organized and structured way.
Is it the same as in Kodein or still different?electrolobzik
01/17/2024, 12:46 PM// `:feature` module
val childModule1 = module {
/* Other definitions here. */
}
val childModule2 = module {
/* Other definitions here. */
}
val parentModule = module {
includes(childModule1, childModule2)
}
romainbsl
01/17/2024, 12:49 PMelectrolobzik
01/17/2024, 12:50 PMromainbsl
01/17/2024, 12:53 PMromainbsl
01/17/2024, 12:54 PMelectrolobzik
01/17/2024, 12:57 PMromainbsl
01/17/2024, 12:57 PMelectrolobzik
01/17/2024, 1:00 PMromainbsl
01/17/2024, 1:04 PMromainbsl
01/17/2024, 1:05 PMelectrolobzik
01/17/2024, 1:08 PMelectrolobzik
01/17/2024, 1:11 PMromainbsl
01/17/2024, 1:15 PMelectrolobzik
01/17/2024, 1:18 PMromainbsl
01/17/2024, 1:20 PMelectrolobzik
01/17/2024, 1:21 PMian.shaun.thomas
01/17/2024, 3:29 PMmultiton
and multi-binding
you can do this is koin too but it isn't as nice. As discussed being able to just use it sans lifecycle makes other things easier too imo like setting up some test cases.electrolobzik
01/17/2024, 3:31 PMian.shaun.thomas
01/17/2024, 3:39 PMval di = DI {
bind<Thing> { singleton { MyThing() } }
}
that is a valid graph which you can use immediately
@Test
fun myTest() {
val thing = di.direct.instance()
...
}
electrolobzik
01/17/2024, 3:45 PMelectrolobzik
01/17/2024, 6:22 PMromainbsl
01/17/2024, 9:42 PMarnaud.giuliani
01/18/2024, 8:08 AMarnaud.giuliani
01/18/2024, 8:08 AMromainbsl
01/20/2024, 10:32 AMarnaud.giuliani
01/22/2024, 8:33 AMSo, the global context can be avoided in a SDKyep, you can isolate completely for SDK purpose yes