https://kotlinlang.org logo
#koin-contributors
Title
# koin-contributors
m

Marcello Galhardo

10/29/2021, 5:07 PM
Hey all! What is the recommended approach to "group modules"? For example: I have a root package called feed and two subpackage called list and details - I wanted to have one module per package and include the two in the root one (feed). Right now, looks like you need to create them separated and introduce a "list" grouping them. Is that correct?
FYI, I wrote a proposal on Koin repository on how I think it should look. 😬 https://github.com/InsertKoinIO/koin/issues/1196#issue-1039572642
a

arnaud.giuliani

11/02/2021, 11:11 AM
For now, you can group them with the
+
operator. This allow to regroup it logically as a list. What you propose is that this groups directly as a Module in fact?
m

Marcello Galhardo

11/02/2021, 11:34 AM
Yes, exactly. Right now I’m using the + operator but each “Gradle Module” has to expose a list with all their content. And in the end I group all list into a single list (featureModuleCollection) In my limited understand, allowing a module to “include” other module would completely hide from “outside” it is a list and the API would motivate people to create smaller modules. Sometimes I see developers simple putting everything in a single module to avoid creating lists of lists. :-(
a

arnaud.giuliani

11/02/2021, 11:49 AM
I see, like including other module’s definition and avoid having list of stuff 🤔
👍 1
great, thanls for your proposal 👍
2 Views