https://maven.aliyun.com/mvn/guide
倉庫名稱 | 阿裡雲倉庫位址 | 阿裡雲倉庫位址(老版) | 源位址 |
---|---|---|---|
central | https://maven.aliyun.com/repository/central | https://maven.aliyun.com/nexus/content/repositories/central | https://repo1.maven.org/maven2/ |
jcenter | https://maven.aliyun.com/repository/public | https://maven.aliyun.com/nexus/content/repositories/jcenter | http://jcenter.bintray.com/ |
public | https://maven.aliyun.com/repository/public | https://maven.aliyun.com/nexus/content/groups/public | central倉和jcenter倉的聚合倉 |
https://maven.aliyun.com/repository/google | https://maven.aliyun.com/nexus/content/repositories/google | https://maven.google.com/ | |
gradle-plugin | https://maven.aliyun.com/repository/gradle-plugin | https://maven.aliyun.com/nexus/content/repositories/gradle-plugin | https://plugins.gradle.org/m2/ |
spring | https://maven.aliyun.com/repository/spring | https://maven.aliyun.com/nexus/content/repositories/spring | http://repo.spring.io/libs-milestone/ |
spring-plugin | https://maven.aliyun.com/repository/spring-plugin | https://maven.aliyun.com/nexus/content/repositories/spring-plugin | http://repo.spring.io/plugins-release/ |
grails-core | https://maven.aliyun.com/repository/grails-core | https://maven.aliyun.com/nexus/content/repositories/grails-core | https://repo.grails.org/grails/core |
apache snapshots | https://maven.aliyun.com/repository/apache-snapshots | https://maven.aliyun.com/nexus/content/repositories/apache-snapshots | https://repository.apache.org/snapshots/ |
引用上面的阿裡雲倉庫位址就行了,速度杠杆的
例如:
buildscript {
repositories {
// google()
// jcenter()
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven{ url 'https://maven.aliyun.com/repository/google'}
}
dependencies {
classpath 'com.android.tools:r8:2.1.75'
classpath 'com.android.tools.build:gradle:4.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// 添加emas-services插件
classpath 'com.aliyun.ams:emas-services:1.0.1'
//添加AndResGuard依賴
classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.20'
//添加華為推送依賴
classpath 'com.huawei.agconnect:agcp:1.3.1.300'
classpath 'com.didichuxing.doraemonkit:dokitx-plugin:3.3.5'
//添加多管道依賴
classpath 'com.leon.channel:plugin:2.0.3'
}
}
allprojects {
repositories {
// google()
// jcenter()
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven{ url 'https://maven.aliyun.com/repository/google'}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}