During android
development, due to various reasons, it is often 编译速度
slow or even stuck. After switching to the 阿里云maven
warehouse, the compilation speed can be improved.
https://maven.aliyun.com/repository/google
jcenter
https://maven.aliyun.com/repository/public
public (aggregate warehouse of central warehouse and jcenter warehouse)
https://maven.aliyun.com/repository/public
gradle-plugin
https://maven.aliyun.com/repository/gradle-plugin
Either jcenter or public can be selected.
build.gradle
buildscript {
repositories {
maven {
url 'https://maven.aliyun.com/repository/public' }
maven {
url 'https://maven.aliyun.com/repository/google' }
maven {
url 'https://maven.aliyun.com/repository/gradle-plugin' }
mavenLocal()
mavenCentral()
google()
jcenter()
...
}
}
allprojects {
repositories {
maven {
url 'https://maven.aliyun.com/repository/public' }
maven {
url 'https://maven.aliyun.com/repository/google' }
maven {
url 'https://maven.aliyun.com/repository/gradle-plugin' }
mavenLocal()
mavenCentral()
google()
jcenter()
...
}
}