Question, how does gradle system work? I am workin...
# android
c
Question, how does gradle system work? I am working on a modularized project, What happens when Two Modules contain the same library like... Core Module A and Core Module B both have the android support library, and this core Modules are implemented on a Feature module, this feature module download the support library twice? Or somehow gradle know about it and just download that library once?
j
once
c
How?
t
Gradle is a well engineered build tool. It avoids doing the same things twice whenever possible in order to speed up your builds. Dependencies are cached by Gradle, so that when multiple modules have the same dependency, the same files are reused. Gradle is even able to choose between multiple versions of a same dependency !
👍 2
c
So we can say that somehow is "safe" to have the same library (if its need) on Two different core Modules, and implement those core Modules into multiple feature Modules because it will Not generate any overhead or download twice the library in the final APK or AAB
g
Yes, it's safe, it's essentially the whole point of build system
👍 1