Gradle入门实战(Windows版)
Installation
Gradle runs on all major operating systems and requires only a Java JDK or JRE version 7 or higher to be installed. To check, run java -version:
$ java -version
java version "1.8.0_121"
Step 1. Download the latest Gradle distribution
download url : https://gradle.org/releases/
提供了二进制包和完整包(包含User Manual、API Javadoc、DSL Reference)
Step 2. Unpack the distribution
Create a new directory C:\Gradle with File Explorer.
Open a second File Explorer window and go to the directory where the Gradle distribution was downloaded. Double-click the ZIP archive to expose the content. Drag the content folder gradle-4.1 to your newly created C:\Gradle folder.
Alternatively(另外) you can unpack the Gradle distribution ZIP into C:\Gradle using an archiver tool of your choice.
Step 3. Configure your system environment
In File Explorer right-click on the This PC (or Computer) icon, then click Properties -> Advanced System Settings -> Environmental Variables.
Under System Variables select Path, then click Edit. Add an entry for C:\Gradle\gradle-4.1\bin. Click OK to save.
Step 4. Verify your installation
Open Windows command prompt and run gradle -v to run gradle and display the version,
e.g.:
$ gradle -v
Gradle 4.1
注意:不同窗口下命令的执行
dos: C:\Users\14009\Desktop\basic-demo>gradlew properties
gitbash: $ ./gradlew properties
Building Java Applications
$ mkdir java-demo
$ cd java-demo
$ gradle init --type java-application
build.gradle 中添加 apply plugin: ‘idea’
执行命令 gradle idea
用 IntelliJ IDEA打开就可以开始编码
Building Java Libraries
$ mkdir building-java-libraries
$ cd building-java-libraries
$ gradle init --type java-library
Building Java Web Applications
1.0 Create the structure of a web application
create the following file structure for a project called webdemo
:
webdemo/
src/
main/
java/
webapp/
test
java/
2.0 Add a Gradle build file
Add a file called build.gradle
to the root of the project, with the following contents:
build.gradle
plugins {
id 'java'
id 'war'
} repositories {
jcenter()
} dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
testCompile 'junit:junit:4.12'
}
It is a good practice to generate a Gradle wrapper for the project by executing the wrapper
task:
$ gradle wrapper --gradle-version=4.0
Gradle入门实战(Windows版)的更多相关文章
- ALCHEMY 2 (FLASCC)新手入门 (WINDOWS 版)
Adobe Alchemy(炼金术) 2的预发布版本已经对开发者开放,并且已经更名为 FlasCC.炼金术简单来说就是把c/c 代码编译成swf文件,它吸收了c/c 高效的执行效率,比传统开发的swf ...
- Ruby入门--Linux/Windows下的安装、代码开发及Rails实战
Ruby入门--Linux/Windows下的安装.代码开发及Rails实战 http://www.linuxidc.com/Linux/2014-04/100242.htm Ubuntu 13.04 ...
- Android Studio2.0 教程从入门到精通Windows版 - 入门篇
http://www.open-open.com/lib/view/open1468121363300.html 本文转自:深度开源(open-open.com)原文标题:Android Studio ...
- Docker技术入门与实战 第二版-学习笔记-10-Docker Machine 项目-2-driver
1>使用的driver 1〉generic 使用带有SSH的现有VM/主机创建机器. 如果你使用的是机器不直接支持的provider,或者希望导入现有主机以允许Docker Machine进行管 ...
- Android Studio2.0 教程从入门到精通Windows版
系列教程 Android Studio2.0 教程从入门到精通Windows版 - 安装篇Android Studio2.0 教程从入门到精通Windows版 - 入门篇Android Studio2 ...
- Docker技术入门与实战 第二版-学习笔记-8-网络功能network-3-容器访问控制和自定义网桥
1)容器访问控制 容器的访问控制,主要通过 Linux 上的 iptables防火墙来进行管理和实现. iptables是 Linux 上默认的防火墙软件,在大部分发行版中都自带. 容器访问外部网络 ...
- 移动端自动化测试Appium 从入门到项目实战Python版☝☝☝
移动端自动化测试Appium 从入门到项目实战Python版 (一个人学习或许会很枯燥,但是寻找更多志同道合的朋友一起,学习将会变得更加有意义✌✌) 说到APP自动化测试,Appium可是说是非常流 ...
- 移动端自动化测试appium 从入门到项目实战Python版✍✍✍
移动端自动化测试appium 从入门到项目实战Python版 整个课程都看完了,这个课程的分享可以往下看,下面有链接,之前做java开发也做了一些年头,也分享下自己看这个视频的感受,单论单个知识点课程 ...
- 移动端自动化测试Appium 从入门到项目实战Python版
移动端自动化测试Appium 从入门到项目实战Python版 整个课程都看完了,这个课程的分享可以往下看,下面有链接,之前做java开发也做了一些年头,也分享下自己看这个视频的感受,单论单个知识点课 ...
随机推荐
- CSS样式收集
1.改变浏览器滚动条样式(适合webkit内核,摘自www.webhek.com/scrollbar) ::-webkit-scrollbar{width:2px;} ::-webkit-scroll ...
- 如何使用SnpEff 对SNP结果进行分析
SnpEff is a variant annotation and effect prediction tool. It annotates and predicts the effects of ...
- 对";一维最大子数组和";问题的思考(homework-01)
一维最大子数组和问题,即给定一个数组,在它所有的连续子数组的和中,求最大的那个和.“最大子数组和”是一个很好的IT面试考题,在<编程之美>一书中同时阐述了一维数组和二维数组的讨论.本篇博客 ...
- [Swust OJ 763]--校门外的树 Plus(暴力枚举)
题目链接:http://acm.swust.edu.cn/problem/0763/ Time limit(ms): 1000 Memory limit(kb): 65535 西南某科技大学的校门外有 ...
- iOS 启动页后广告Demo
重点! 对于启动页后的广告,相信大家也都看到过很多很多的,比如我自己常看到的有 QQ音乐,爱奇艺了.你点击了APP,它会启动就会随之启动..其实这些APP的启动页是没有消失的,你去认真的观察一下!所以 ...
- 理解Java中的抽象
在计算机科学中,抽象是一种过程,在这个过程中,数据和程序定义的形式与代表的内涵语言相似,同时隐藏了实现细节. 抽象:一个概念或者想法不和任何特定的具体实例绑死. 目录 什么是抽象 抽象的形式 如何在J ...
- 博客收藏--sailing的博客
http://blog.sina.com.cn/sailingxr free:这个博客主页的内容不错 PC的足迹 arm与x86 浅谈PCIe体系架构 浅谈cache memory
- Ext JS 6正式版的GPL版本下载地址
下面是Ext JS 6正式版的GPL版本下载地址 https://www.sencha.com/legal/gpl/
- plugin.go 源码阅读
, nil) } if c.client != nil { c.client.Close() } ...
- C语言典型编程2
关于C的一些小而精的编程,适合希望提升编程能力的初学者学习:关键编程也就几句,但思维可以迁移到其他编程语言.同一问题,算法多种. //任意整数的任意次方取后3位(算数取位)#include<st ...