Hi guys, I am trying to convert my huge project into multi-module project. I have basic knowledge of this module. But I don't get it what type of logic used in :`core,:data` etc. So anyone guide me on this ? Also how multi-gradle works i.e. how project library dependency works ? Many thanks
u
_LooKeR_
12/18/2022, 5:36 AM
Lets assume that you have many datasources in you project, such as Database, Network, etc. coreData should be the place where all those logic should merge i.e. you ahould be saving network data into database and return the data from database (also known as offline-first method) in this module. You can do that like this.
k
KotlinLeaner
12/18/2022, 7:07 AM
Perfect got it. What is the use of
:domain
,
: presentations
? How many types of multi-module will be in project structure?
u
_LooKeR_
12/18/2022, 7:38 AM
I personally dont use
:domain
layer, in
:presentation
you keep logica likehow to animate a composable on certain events and other UI related logic and you also access other layers with ViewModels. Generally presentation layer only interact with data layer but if you have multiple repositories in data layer which needs to be merged most of the time like this, you may consider using domain layer which will hide most logics behind a curtain.