赞
踩
init.gradle
文件touch init.gradle
buildscript {
repositories {
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://plugins.gradle.org/m2/' }
}
}
allprojects {
repositories {
def ALIYUN_REPOSITORY_URL = 'https://maven.aliyun.com/repository/public/'
all { ArtifactRepository repo ->
if(repo instanceof MavenArtifactRepository){
def url = repo.url.toString()
if (url.startsWith('https://repo1.maven.org/maven2')||url.startsWith('https://jcenter.bintray.com')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_REPOSITORY_URL."
remove repo
}
}
}
maven {
url ALIYUN_REPOSITORY_URL
}
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。