I was looking in to the google sample for the new architecture component, where I found the the code as below:
dependencies {
// Support libraries
implementation deps.support.app_compat
implementation deps.support.v4
implementation deps.support.design
implementation deps.support.cardview
// Architecture components
implementation deps.lifecycle.runtime
implementation deps.lifecycle.extensions
annotationProcessor deps.lifecycle.compiler
implementation deps.room.runtime
annotationProcessor deps.room.compiler
// Android Testing Support Library's runner and rules
androidTestImplementation deps.atsl.runner
androidTestImplementation deps.atsl.rules
androidTestImplementation deps.room.testing
androidTestImplementation deps.arch_core.testing
// Espresso UI Testing
androidTestImplementation deps.espresso.core
androidTestImplementation deps.espresso.contrib
androidTestImplementation deps.espresso.intents
// Resolve conflicts between main and test APK:
androidTestImplementation deps.support.annotations
androidTestImplementation deps.support.v4
androidTestImplementation deps.support.app_compat
androidTestImplementation deps.support.design
}
I am not able to understand why they have written all the dependency starting with deps.*
. Could anybody help me understand the code. Thanks in advance.
Here is the link to the repo.
deps
is an instance of Map
class that is set on project
instance and defined in versions.gradle file. This versions.gradle
file is in turn applied in root build.gradle
script, hence deps
can be used in subprojects.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With