settings.gradle
pluginManagement {
repositories {
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } //gradle-plugin
maven { url 'https://maven.aliyun.com/repository/google' } //google
maven { url 'https://maven.aliyun.com/repository/public' } //public
maven { url 'https://maven.aliyun.com/repository/jcenter' } //jcenter
/*google()
mavenCentral()
gradlePluginPortal()*/
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } //gradle-plugin
maven { url 'https://maven.aliyun.com/repository/google' } //google
maven { url 'https://maven.aliyun.com/repository/public' } //public
maven { url 'https://maven.aliyun.com/repository/jcenter' } //jcenter
/* google()
jcenter()
mavenCentral()*/
}
}
gradle-wrapper.properties
根据 gradle版本去镜像网址复制下载链接 替换
https://mirrors.cloud.tencent.com/gradle/
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.5-bin.zip