Set Gradle's binary download source

Preparation

GradleFind the files gradle/wrapperunder the directory in your projectgradle-wrapper.properties


Tencent Cloud

Add the binary download address of Tencent Cloud
Modify gradle-wrapper.propertiesthe download address of distributionUrl in the file

distributionUrl=https://mirrors.tencent.com/gradle/gradle-{version}-bin.zip

Ali Cloud

Add the binary download address of Alibaba Cloud
Modify the download address gradle-wrapper.propertiesin the filedistributionUrl

distributionUrl=https://mirrors.aliyun.com/gradle/gradle-{version}-bin.zip

at last

Save and rebuild the project
Save gradle-wrapper.propertiesthe file, and rebuild your Gradleproject. GradleThe binaries will be downloaded from Alibaba Cloud's servers.
Note that the version number of will replace the placeholder Gradlein the above code . {version}So if you're using Gradleversion 6.7.1, Gradlethe binaries will be downloaded from:

https://mirrors.aliyun.com/gradle/gradle-6.7.1-bin.zip

Guess you like

Origin blog.csdn.net/qq_31762741/article/details/130604271