当前位置:网站首页>[gradle] quick configuration
[gradle] quick configuration
2022-07-19 01:06:00 【No bug is the biggest bug】
One .Gradle brief introduction
Gradle It's from Apache Ant and Apache Maven Concept of project automation to build open source tools , It uses one based on Groovy Domain specific languages (DSL) To declare project settings , Abandoned based on XML Various cumbersome configurations for Java Application oriented . Currently, the supported languages are Java、Groovy、Kotlin and Scala.
Gradle It's based on JVM Build tools for , It's a general and flexible build tool , Support maven, Ivy Warehouse , Support transitive dependency management , There's no need for a remote warehouse or pom.xml and ivy.xml The configuration file , be based on Groovy,build Script use Groovy To write .
IDEA 2017.3 Above version support .
Two . download
Official website :Gradle | Installation
Two download methods are provided ,Binary-only Is to download only binary source code ,Complete, with docs and sources Is to download the source code and documentation . If you need to read the document, you can download the second , No need to download Binary-only that will do .
3、 ... and . install
Extract the installation package to the directory where you want to install it .
Four . Configure environment variables
1. Add system variables
Variable name :GRADLE_HOME
A variable's value : Extracted Directory
2. Add system variables
Variable name :GRADLE_USER_HOME
A variable's value :Maven The warehouse directory of

3. Edit... In the system variable Path
Variable name :Path
A variable's value :%GRADLE_HOME%\bin;

4. open CMD Input gradle -v The following scenario indicates that the installation and configuration are successful

5、 ... and . To configure Gradle Warehouse source
stay Gradle Install under directory init.d Under the folder , Create a new one init.gradle file , Fill in the following configuration .
allprojects {
repositories {
maven { url 'file:///D:/maven/repository'}
mavenLocal()
maven { name "Alibaba" ; url "https://maven.aliyun.com/repository/public" }
maven { name "Bstek" ; url "http://nexus.bsdn.org/content/groups/public/" }
mavenCentral()
}
buildscript {
repositories {
maven { name "Alibaba" ; url 'https://maven.aliyun.com/repository/public' }
maven { name "Bstek" ; url 'http://nexus.bsdn.org/content/groups/public/' }
maven { name "M2" ; url 'https://plugins.gradle.org/m2/' }
}
}
}Be careful : first url Path changed to own maven Warehouse path .
repositories It's about getting jar Order of packages . First, it's local Maven Warehouse path ; And then mavenLocal() Is to obtain Maven Path to local warehouse , It should be the same as the first one , But no conflict ; Article 3 and Article 4 are obtained from domestic and foreign network warehouses ; final mavenCentral() It's from Apache Provide central warehouse access to jar package .
6、 ... and . Configuration to IDEA
1. establish Gradle engineering

2. stay IDEA Of Setting Search inside Gradle To configure gradle The path of

3. A simple test
introduce SpringBoot rely on
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.7.1'
function

If... Is set in variables and configuration files Gradle Warehouse Path for , stay Service directory path The address will be automatically filled in , If you want to change it, you can modify it manually .
边栏推荐
- Hcia-r & s self use notes (8) IP address basis, subnet mask, subnet Division
- (十)STM32——Systick滴答定时器
- 高等数学---第八章多元函数微分学---多元函数的极值与最值
- Advanced Mathematics - Chapter 8 differential calculus of multivariate functions - extreme and maximum values of multivariate functions
- IDEA开发Servlet项目 如何右键创建servlet
- Mysql的索引为什么使用B+树而不使用跳表?
- WampServer
- 食物链(dfs记忆化)
- Asynchronous programming & Collaboration
- 在mysql数据库插入中文值出现的乱码解决
猜你喜欢

Mysql—多版本並發控制(MVCC)
![[deep learning] (II) basic learning notes of deep learning](/img/fe/99c56e2b7e8d6807ece120e0ee1ceb.png)
[deep learning] (II) basic learning notes of deep learning

Press and hold day 27: Service

Leetcode 242: valid Letter ectopic words

sqli-labs less-1(报错注入之extractvalue)

MySQL lock: comprehensive understanding

Switch and router technology: link aggregation, spanning tree protocol STP and spanning tree protocol configuration

cli和vite通过代理实现跨域

【MySQL】ERROR 1130 问题解决方案

12. Integer to Roman numerals ●●
随机推荐
【单例模式】饿汉式、懒汉式、双重锁安全验证
【Liunx】发布Jar包、日志动态查看、查看程序进程、结束程序
【MariaDB】解决:ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
LeetCode 242:有效的字母异位词
cli和vite通过代理实现跨域
mysql中的配置文件
在mysql數據庫插入中文值出現的亂碼解决
Julia初学者教程2022
P1321 单词覆盖还原【入门】
插入排序总结
简单聊聊最近遇到的两个面试题
API design principles from the requirements of compiler for instruction set
Baidu page starts from 1 and JPA starts from 0
Hcia-r & s self use notes (7) (network layer) TTL and loop test, protocol number
抖音抓包通杀版-version21.5
如何设计一个安全的对外接口
64 bit interrupt assembly cannot be used
Service层需要接口吗
Visual studio error: solution of c4996 error in strcpy
openpyxl 绘制雷达图