Trying to understand the module dependencies #653
-
Hi there, I'm trying to understand the dependencies of the different modules in this app. But when you look at the ForYouViewModel, it needs a UserDataRepository from :core:data, and two use cases from :core:domain How is this module independent from those? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'll answer my own question since I found out. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/android/nowinandroid/blob/main/docs/ModularizationLearningJourney.md Though convention is briefly mentioned on this page, it could use an update to further explain it. |
Beta Was this translation helpful? Give feedback.
I'll answer my own question since I found out.
If multiple modules need a common set of dependencies, they can be (and are in this app) provided through the Gradle convention plugin.
This keeps the gradle files for those modules small. It can also drive you insane searching if you don't know Gradle well enough yet.