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

I was looking for a Google sample for a new architecture component, where I found the code 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 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 can’t understand why they wrote all the dependency starting with deps.*. Can anyone help me understand the code. Thanks in advance. Here is the link in the repo.

+4
source share
2 answers

depsis an instance of a class Mapthat is installed in the instance projectand defined in the versions.gradle file . This versions.gradlefile, in turn, is used in the root directory of the build.gradlescript, therefore it depscan be used in subprojects.

+5
source

Adding to @Opal's suggestions.

deps , .

, Dagger2, deps .gradle, .

*def dagger = [:]
dagger.runtime = "com.google.dagger:dagger:$versions.dagger"
dagger.android = "com.google.dagger:dagger-android:$versions.dagger"
.....

deps.dagger = dagger*

,

, . , , build.gradle.

0

Source: https://habr.com/ru/post/1689107/


All Articles