官网下载:
https://gradle.org/releases/
版本说明:
Windows端配置:
变量名:
GRADLE_HOME
变量值(根据需要自己配置:):
E:\JavaE\JavaSkill\gradle-7.3
就像配置JDK一样到高级系统设置中:
配置路径:
%GRADLE_HOME%\bin
3,检验:
gradle -v
4,修改源:
修改gradle maven 源到阿里云
进入C:\Users{用户名}.gradle
创建 init.gradle 文件名
allprojects{
repositories {
def REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/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 $REPOSITORY_URL."
remove repo
}
}
}
maven {
url REPOSITORY_URL
}
} }
5,其他版本可以参考官网:
https://gradle.org/install/#manually