解决Gradle依赖同步慢的问题,仅供参考,我不这么用。
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript({
repositories {
//首先去阿里云的仓库去找
maven{
url{'http://maven.aliyun.com/nexus/content/groups/public/'}
}
//如果找不到,就去Google仓库去找
google()
//再找不到,就去jcenter仓库去找
jcenter()
}
dependencies {
classpath 'command.android.tools.build:gradle:3.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
})
allprojects({
repositories({
maven{
url{'http://maven.aliyun.com/nexus/content/groups/public/'}
}
google()
jcenter()
})
})
task clean(type: Delete) {
println('-------' + rootProject.buildDir)
// delete rootProject.buildDir
}
网友评论