会挽雕弓如满月,西北望,射天狼。这篇文章主要讲述gradle下载与安装(未更新完毕)相关的知识,希望能为你提供帮助。
1、gradle下载地址:https://gradle.org/releases/
2、下载后解压
文章图片
3、环境变量配置:
GRADLE_HOME:配置你解压gradle的目录,如下图
PATH:配置bin目录,如下图
GRADLE_USER_HOME:类似于maven的本地仓库,下载了所有的jar包,此位置配置gradle的仓库(在解压gradle的路径下新建一个空文件夹gradle)
文章图片
文章图片
文章图片
4、gradle的配置文件(类似于maven的setting文件)Gradle还是从maven仓库下载
给gradle安装目录下建一个init.d文件夹,放一个init.gradle文件,内容如下:
gradle.projectsLoaded
rootProject.allprojects
buildscript
repositories
def JCENTER_URL = https://maven.aliyun.com/repository/jcenter
def GOOGLE_URL = https://maven.aliyun.com/repository/google
def NEXUS_URL = http://maven.aliyun.com/nexus/content/repositories/jcenter
allArtifactRepository repo ->
if (repo instanceof MavenArtifactRepository)
def url = repo.url.toString()
if (url.startsWith(https://jcenter.bintray.com/))
project.logger.lifecycle "Repository $repo.url replaced by $JCENTER_URL."
println("buildscript $repo.url replaced by $JCENTER_URL.")
remove repoelse if (url.startsWith(https://dl.google.com/dl/android/maven2/))
project.logger.lifecycle "Repository $repo.url replaced by $GOOGLE_URL."
println("buildscript $repo.url replaced by $GOOGLE_URL.")
remove repoelse if (url.startsWith(https://repo1.maven.org/maven2))
project.logger.lifecycle "Repository $repo.url replaced by $REPOSITORY_URL."
println("buildscript $repo.url replaced by $REPOSITORY_URL.")
remove repojcenter
url JCENTER_URLgoogle
url GOOGLE_URLmaven
url NEXUS_URLrepositories
def JCENTER_URL = https://maven.aliyun.com/repository/jcenter
def GOOGLE_URL = https://maven.aliyun.com/repository/google
def NEXUS_URL = http://maven.aliyun.com/nexus/content/repositories/jcenter
allArtifactRepository repo ->
if (repo instanceof MavenArtifactRepository)
def url = repo.url.toString()
if (url.startsWith(https://jcenter.bintray.com/))
project.logger.lifecycle "Repository $repo.url replaced by $JCENTER_URL."
println("buildscript $repo.url replaced by $JCENTER_URL.")
remove repoelse if (url.startsWith(https://dl.google.com/dl/android/maven2/))
project.logger.lifecycle "Repository $repo.url replaced by $GOOGLE_URL."
println("buildscript $repo.url replaced by $GOOGLE_URL.")
remove repoelse if (url.startsWith(https://repo1.maven.org/maven2))
project.logger.lifecycle "Repository $repo.url replaced by $REPOSITORY_URL."
println("buildscript $repo.url replaced by $REPOSITORY_URL.")
remove repojcenter
url JCENTER_URLgoogle
url GOOGLE_URLmaven
url NEXUS_URL
5、配置idea整合【gradle下载与安装(未更新完毕)】
文章图片
6、下载spring源码
Spring在github上的仓库地址是:https://github.com/spring-projects/spring-framework
Spring在码云上的仓库地址是:https://gitee.com/mirrors/Spring-Framework
或者自己同步源码
7、将下载的源码解压以后,导入IDEA,导入步骤如下;
文章图片
文章图片
此操作后,等待gradle仓库下载完毕
推荐阅读
- # yyds干货盘点 # 盘点6个Pandas中批量替换字符的方法
- 如何在 Python 中创建DataFrame
- k8s集群StatefulSets的Pod调度查询丢失问题?
- Python 学习路线(2022)
- 在U盘PE中如何更改内部注册表?
- U盘如何转换成NTFS格式?
- 运用注册表处理win7电脑无法识别U盘设置图文详细教程
- windows10系统怎样添加usb快捷删除键?
- 怎样让win7电脑只识别咱们指定的U盘?