文件路径:
C:\Users\laremehpe\.gradle\init.gradle
allprojects {
repositories {
def REPOSITORY_URL = 'https://maven.aliyun.com/repository/gradle-plugin'
all { ArtifactRepository repo ->
if (repo instanceof MavenArtifactRepository) {
def url = repo.url.toString()
if (url.startsWith('https://services.gradle.org') ||
url.startsWith('https://downloads.gradle.org')) {
project.logger.lifecycle "Changing repository URL for ${repo.url} to $REPOSITORY_URL."
repo.url = new URL(REPOSITORY_URL)
}
}
}
}
}