在android开发中,因为各种原因,时常编译速度缓慢甚至卡住不动,切换到阿里云maven仓库之后,则可以提升编译速度。
1. google
2. jcenter
3. public(central仓和jcenter仓的聚合仓)
4. gradle-plugin
jcenter和public二选一即可。
5. 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()
}
}
6.阿里云云效 Maven
链接:https://juejin.cn/post/6907479665305190408
来源:稀土掘金