3.1. Prerequisites

Gradle requires a Java JDK or JRE to be installed, version 6 or higher (to check, use java -version). Gradle ships with its own Groovy library, therefore Groovy does

//gradle需要安装jdk或者jre,版本在6以上

not need to be installed. Any existing Groovy installation is ignored by Gradle.

//gradle有自己的groovy语言库,已经安装的groovy包会被gradle忽略

Gradle uses whatever JDK it finds in your path. Alternatively, you can set the JAVA_HOME environment variable to point to the installation directory of the desired JDK.

3.2. Download

You can download one of the Gradle distributions from the Gradle web site.

3.3. Unpacking

The Gradle distribution comes packaged as a ZIP. The full distribution contains:

  • The Gradle binaries.

  • The user guide (HTML and PDF).

  • The DSL reference guide.

  • The API documentation (Javadoc and Groovydoc).

  • Extensive samples, including the examples referenced in the user guide, along with some complete and more complex builds you can use as a starting point for your own build.

  • The binary sources. This is for reference only. If you want to build Gradle you need to download the source distribution or checkout the sources from the source repository. See the Gradle web site for details.

3.4. Environment variables

For running Gradle, firstly add the environment variable GRADLE_HOME. This should point to the unpacked files from the Gradle website. Next add GRADLE_HOME/bin to yourPATH environment variable. Usually, this is sufficient to run Gradle.

3.5. Running and testing your installation

You run Gradle via the gradle command. To check if Gradle is properly installed just type gradle -v. The output shows the Gradle version and also the local

//使用gradle -v命令输出gradle版本内容来检查gradle是否正确安装

environment configuration (Groovy, JVM version, OS, etc.). The displayed Gradle version should match the distribution you have downloaded.

3.6. JVM options

JVM options for running Gradle can be set via environment variables. You can use either GRADLE_OPTS or JAVA_OPTS, or both. JAVA_OPTS is by convention an environment variable shared by many Java applications. A typical use case would be to set the HTTP proxy in JAVA_OPTS and the memory options in GRADLE_OPTS. Those variables can also be set at the beginning of the gradle or gradlew script.

Note that it's not currently possible to set JVM options for Gradle on the command line.

Chapter 3. Installing Gradle 安装gradle的更多相关文章

  1. Gradle安装 Gradle效率提升 eclipse安装gradle插件 【我】

    Gradle安装 从官网下载 gradle4.6版本,也可以从svn地址下载 https://downloads.gradle.org/distributions/gradle-4.6-bin.zip ...

  2. Gradle笔记——Gradle的简介与安装

    本博客对Gradle进行一个简单的介绍,以及它的安装. Gradle介绍 Gradle是一个基于JVM的构建工具,它提供了: 像Ant一样,通用灵活的构建工具 可以切换的,基于约定的构建框架 强大的多 ...

  3. Gradle安装

    最近在学Android,而Android是由Gradle来构建的:Gradle是一个基于 JVM 的构建工具.所以开始学习Android之前,先进行Gradle安装与学习: mac: 使用SDKMAN ...

  4. Gradle用户指南(1)-Gradle安装

    前置条件 Gradle 需要 Java JDK 或者 JRE,版本是 6 及以上.Gradle 将会装载自己的 Groovy 库,因此,Groovy 不需要被安装.任何存在的 Groovy 安装都会被 ...

  5. ubuntu下安装gradle

    1.下载gradle 下载地址:当前版本gradle-2.10-all.zip http://gradle.org/gradle-download/ 2.解压安装gradle unzip gradle ...

  6. eclipse安装Gradle

    第一步:下载Gradle>http://gradle.org/gradle-download 第二步:解压gradle-2.5, 配置环境变量:GRADLE_HOME path添加;%GRADL ...

  7. Eclipse4JavaEE安装Gradle,并导入我们的Gradle项目

    第一步:下载Gradle Gradle下载链接,如下图,下载最新版本即可.下载下来的zip包,解压到一个目录即可,如F盘 第二步:配置环境变量 首先添加GRADLE_HOME,如下图 然后在Path下 ...

  8. mac下安装gradle

    安装 gradle brew install gradle 配置Path环境 vim .bash_profile // 写入 export PATH="${PATH}:/usr/local/ ...

  9. Linux安装Gradle

    Linux安装Gradle   Gradle 是以 Groovy 语言为基础,面向Java应用为主.基于DSL(领域特定语言)语法的自动化构建工具.在github上,gradle项目很多,有的是gra ...

随机推荐

  1. Hibernate 注解 动态插入( DynamicInsert) 动态更新(DynamicUpdate)

    @DynamicUpdate(value = true)@DynamicInsert(value = true) 这两个注解默认是false,经试验,如果使用了这两个注解,在一定程度上是可以提高插入和 ...

  2. [wikioi]多源最短路

    http://wikioi.com/problem/1077/ Floyd算法.精华是三层循环,if (dist(i,k) + dist(k,j) < dist(i,j)) then dist( ...

  3. awk将普通文本转换成json文件

    script1: #!/bin/bash #Date:-- #Author:eivll0m awk -F"\t" -vq='"' '{ a[$]=a[$]?a[$]:$ ...

  4. java 枚举使用详解

    在实际编程中,往往存在着这样的“数据集”,它们的数值在程序中是稳定的,而且“数据集”中的元素是有限的. 例如星期一到星期日七个数据元素组成了一周的“数据集”,春夏秋冬四个数据元素组成了四季的“数据集” ...

  5. pyhton 查找一个数的所有因子 以及 判断一个数是否是质数 两个小脚本

    最近看到一个网站, 欧拉计划.挺好玩,都是一些算法题.这是本站:http://projecteuler.net/problems 这个是中文站:http://pe.spiritzhang.com/ 下 ...

  6. Linux Mono OpenShift Cloud9 rhc

    OpenShift Mono Asp.net MVC4 MySql 1..Net4.0+Mvc4,不要使用太新的.Net4.5.1+Mvc5. 2.MySql数据库:MySql.Data.Dll 从官 ...

  7. Semi-definite programming优化工具

    半正定优化工具(SDPLR) SDPLR 是一个求解大规模半正定规划问题的C语言包.具体使用方法参见: http://dollar.biz.uiowa.edu/~sburer/pmwiki/pmwik ...

  8. 转 wordpress搭建

    新建一个博客文件 在搭建博客的过程中,我们需要创建一个文件,用来存储博客的相关信息.这些信息包括域名的信息,主机空间服务器ip,FTP登录名和密码,空间面板登录信息等等,只要是与该博客有关的信息,全部 ...

  9. Vi和Vim的区别及联系

    它们都是多模式编辑器,不同的是vim 是vi的升级版本,它不仅兼容vi的所有指令,而且还有一些新的特性在里面.vim的这些优势主要体现在以下几个方面:1.多级撤消我们知道在vi里,按 u只能撤消上次命 ...

  10. Raspberry Pi Kernel Compilation 内核编译官方文档

    elinux.org/Raspberry_Pi_Kernel_Compilation#Use_the_provided_compiler Software & Distributions: S ...