Gradle 使用阿里云镜像源

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

buildscript {
    repositories {
        // 插入阿里云镜像源
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        // 插入阿里云镜像源
        maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
文章目录
|