Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "deps" in "implementation deps.support.app_compat"?

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.

like image 464
Lalit Behera Avatar asked Nov 11 '17 10:11

Lalit Behera


1 Answers

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.

like image 146
Opal Avatar answered Nov 11 '22 11:11

Opal