https://kotlinlang.org logo
Title
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
m

Marcello Galhardo

11/09/2021, 10:49 AM
An initial implementation for the “Module Grouping” feature - feedbacks are welcomed! https://github.com/InsertKoinIO/koin/pull/1210
a

arnaud.giuliani

11/15/2021, 10:00 AM
great, thanls for your proposal 👍