当前位置:网站首页>Gradle [graphic installation and use demonstration]
Gradle [graphic installation and use demonstration]
2022-07-23 18:42:00 【Xiao Kai, who loves fishing】

One 、 Related introduction
Gradle It's a good build tool , The reason for using it is :
- Less configuration dependent code , Don't like maven equally xml Too much
- Package, compile, test and release , And it's easy to use
- Use custom tasks to complete the functions you want
Two 、 install
Download address http://services.gradle.org/distributions/ , Download the version you need , Here's what I downloaded gradle-4.7-bin.zip. After downloading, unzip it to the directory you want , Then set the environment variable :


stay cmd View in mode , The following information shows that the installation was successful :

Then we can configure in the environment variable gradle Default warehouse address ( and maven Not quite the same. ):

3、 ... and 、IED The use of
1、IDEA
Use idea Create a web Of Gradle project



Then package and run the project :

double-click war

After packing war The file will be :

And then put war Put the corresponding tomcat directory , There's no more explanation here .
2、Eclipse
eclipse Install plug-ins by yourself , The plug-in path is :http://download.eclipse.org/buildship/updates/e46/releases/2.x/ .
Four 、 Problem specification
1、 explain build.gradle and settings.gradle
First, a project contains group、name、version .settings.gradle It is used to manage multiple projects , It contains the project name

stay build.gradle in ,apply It is an application plug-in , Such as :

Here we use java and war Plug in for ,dependencies It is used to declare what the project depends on jar

What's explained here is , We rely on junit Of jar. These include complile( Compile time )runtime( Runtime )testCompile( Test compile time )testRuntime( Test run time ).repositories It's a warehouse gradle They will go to the warehouse in order from top to bottom jar

Here we default to a maven Central warehouse , from gradle The address we see in the source code is like this

Here you can configure , among mavenLocal() Use local maven Warehouse ;mavenCentral() Use maven Central warehouse . Use a fixed address , Alibaba cloud can be used here (maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'}) The image download speed of will be faster , Then you can also use the private server address inside the company .

边栏推荐
- jumpserver管理员账号被锁定
- ZigBee system development of Internet of things I (Introduction to ZigBee) [easy to understand]
- How to become a modeler? Which is more popular, industrial modeling or game modeling?
- MySQL performance tuning
- MySQL classic exercises and answers, 50 common SQL sentence exercises
- SQLZOO——SELECT from Nobel Tutorial
- 手写bind、call、apply其实很简单
- [whole process of game modeling model production] 3ds Max and ZBrush produce radio receivers
- Problems and methods of creating multiple projects under one solution in VS2010
- Is learning next generation modeling a good scene or a good role? Choose the right profession and pay more than half
猜你喜欢

Three things programmers want to do most | comics

类的基础

Behind the recovery of the B-END Market: who stands in front of the stage?

Pessimistic lock and optimistic lock

ROS (27): the simple use of rosparam and the unsuccessful transfer of parameters through launch and its solution

Redis【超强超细 入门教程】

How to become a modeler? Which is more popular, industrial modeling or game modeling?

Rhcsa notes 3

建模刚开始学习很迷茫,次世代角色建模该怎么学习?

Paddlenlp之UIE分类模型【以情感倾向分析新闻分类为例】含智能标注方案)
随机推荐
多线程【全面学习 图文精讲】
DDD: how to use domain driven design to avoid writing journal code
jumpserver管理员账号被锁定
【游戏建模模型制作技巧分享】ZBrush如何调整笔刷大小
Flink Exactly-Once 投递实现浅析
建模刚学习很迷茫,次世代角色建模流程具体该怎么学习?
学次世代建模是场景好还是角色好?选对职业薪资多一半
?前台传参的问题待确认
PCL: multi line fitting (RANSAC)
Alliance DAO创始人:100+Web3基础设施及Dapp创业清单
How does Apache, the world's largest open source foundation, work?
MySQL classic exercises and answers, 50 common SQL sentence exercises
代码整洁,高效的系统方法
Oracle database version after 11C uses memory_ Target automatic memory management
使用kail破解wifi密码
[toggle 30 days of ML] Diabetes genetic risk detection challenge (2)
Interface test overview
OSI模型第一层:物理层,基石般的存在!
Leetcode sword finger offer II 115. reconstruction sequence: diagram topology sorting
如何抓取新浪财经数据中心分析师评级数据?