Gradle 修改 Maven 仓库地址

修改 Gradle Maven 仓库地址为阿里云镜像
修改根和子目录下的 build.gradle 文件,追加阿里云仓库:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
buildscript {
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url "https://urbanairship.bintray.com/android" }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// 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()
}
}

坚持原创及高品质技术分享,您的支持将鼓励我继续创作!