1. 自定义config.gradle
def versions = [:]
versions.support = '1.0.0-beta01'
versions.constraint_layout = '1.1.2'
versions.junit = "4.12"
versions.test_runner = '1.1.0-alpha4'
versions.test_espresso = '3.1.0-alpha4'
versions.android_gradle_plugin = "3.3.1"
versions.android_android = "4.1.1.4"
versions.auto_service = "1.0-rc4"
versions.auto_common = "0.10"
versions.javapoet = "1.10.0"
ext.deps = [:]//空映射
def deps = [:]
def support = [:]
deps.support = support
def android = [:]
android.gradle_plugin = "com.android.tools.build:gradle:$versions.android_gradle_plugin"
android.android = "com.google.android:android:$versions.android_android"
android.material = "com.google.android.material:material:$versions.support"
deps.android = android