Having gradleDependency check when using extra properties

As my app contains multiple modules, I want to manage the dependencies is a central place, so when I have to update a version of a dependency I just need to do it in one place.

So in my build.gradle in my root folder, I have created the dependencies as extra properties:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.3'

        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'

        classpath 'com.google.gms:google-services:4.3.3'  // Google Services plugin

        classpath 'io.fabric.tools:gradle:1.31.1'

    ext {
        androidBuildToolsVersion = '28.0.3'
        androidCompileSdkVersion = 28
        androidMinSdkVersion = 19
        androidTargetSdkVersion = 28

        def libsuVersion = '2.3.1'
        def daggerVersion = '2.26'
        def robolectricVersion = '4.2.1'

        libraries = [
                androidXLegacySupport: 'androidx.legacy:legacy-support-v4:1.0.0',
                androidXLifeCycleExtendions: 'androidx.lifecycle:lifecycle-extensions:2.1.0',
                androidXAppCompat: 'androidx.appcompat:appcompat:1.0.0',
                androidXMultidex: 'androidx.multidex:multidex:2.0.0',
                androidXRecyclerView: 'androidx.recyclerview:recyclerview:1.0.0',
                androidXConstraintLayout: 'androidx.constraintlayout:constraintlayout:1.1.3',
                guava: 'com.google.guava:guava:24.0-android',

                //testing dependencies
                jUnit: 'junit:junit:4.12',
                jUnitExt: 'androidx.test.ext:junit:1.1.1',
                mockito: 'org.mockito:mockito-core:3.2.0',
                mockitoAndroid: 'org.mockito:mockito-android:3.2.0',
                robolectric: "org.robolectric:robolectric:${robolectricVersion}",
                robolectricShadowMultidex: "org.robolectric:shadows-multidex:${robolectricVersion}",
                androidXTestCore: 'androidx.test:core:1.2.0',
                androidXTestRunner: 'androidx.test:runner:1.1.1',
                androidXTextEspressoCore: 'androidx.test.espresso:espresso-core:3.2.0'

allprojects {
    repositories {

And in the module I declare the dependencies like this:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    implementation libraries.androidXAppCompat
    implementation libraries.guava

However I would like to have this kind of warning: warning

How can I achieve this?