配置 Gradle 镜像

~/.gradle/init.gradle

1
2
3
4
5
6
7
8
9
10
11
12
13
allprojects {
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
mavenLocal()
}
}
repositories {
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/spring/' }
mavenLocal()
}
}

build.gradle

1
2
3
4
5
6
7
8
9
10
11
12
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
mavenLocal()
}
}

repositories {
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/spring' }
mavenLocal()
}