下载安装gradle

1、登录官网:www.gradle.org,进入到下图的界面:

2、点击Install Gradle,跳转到下一个界面后:

3、下载

4、下载成功后,解压到任意位置,将路径添加到path路径下,选择我的电脑,右键点击属性,余下步骤如下图

 

5,见证成功的时刻:

Win+R->cmd,输入gradle,如下图便是安装配置好了

 

配置阿里镜像:

得配置全局的国内镜像,在.的init.d的文件夹下新建一个文件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
 
}
maven { url 'https://maven.aliyun.com/repository/spring/'}
}
 
}
posted @ 2020-08-11 17:09  Takey  阅读(251)  评论(0编辑  收藏  举报