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. 使用GO语言灵活批量ssh登录服务器执行操作

    摘要: 在工作中时常需要登录服务器做一系列操作,每次输入ssh xxx总是很麻烦.这时候为什么不考虑写一个通用的小脚本呢? go语言是一门新兴语言,能够在很多地方发挥总用.初学go语言,做了这么一个小 ...

  2. 解决linux下导入数据库乱码问题

    引言:在windows下的mysql数据库导出SQL文件,在Linux下导入后显示为乱码. 1.启动Mysql服务及创建数据库(下面uushop为我将创建的数据库名) service mysqld s ...

  3. 三年所有JAVA技术文档列表

    学习工作流workflow管理基础概念.pdf 深入浅出Struts2(PDF).zip 深入浅出Hibernate.pdf 敏捷软件开发:原则.模式与实践.rar 精通Oracle.10g.Pl.S ...

  4. POJ_3111_K_Best_(二分,最大化平均值)

    描述 http://poj.org/problem?id=3111 n个珠宝,第i个有价值v[i]和重量w[i],要从总选k个,使得这k个的(价值之和)/(重量之和)即平均价值最大,输出选中的珠宝编号 ...

  5. 【C++ in Qt5】一个简单的通讯录程序,支持文件存取

    https://github.com/shalliestera/AddressBook 使用Qt5完成了一些之前用DevCpp很难做到的事,比如更简单地实现“从文件读取”和“保存到文件”的功能.之前我 ...

  6. sql server 2005+ 翻页

    select * from ( select row_number() over (order by dm) row,* from t_zycp where dm like '%4%' ) tmp

  7. [辅助类]NHibernateHelper

    对于学习ORM的人来说,NHibernate简直就是福音啊,而且此中技术是相当成熟,在这里分享一个小东西 public class NHibernateHelper { //数据库连接字符串 publ ...

  8. 有7g和2g的砝码各一个,怎样称可以3次把140g东西分为50g和90g???????

    第一次:等分 50和90为   70 70 2.   7g 和2g  ,取出一个70中的9g   ,  61   70 3.利用 9g和2g砝码,取出61中的11克,前面的9 和 11 都放进70

  9. jQuery 参考手册 - 事件

    事件方法会触发匹配元素的事件,或将函数绑定到所有匹配元素的某个事件. bind()向匹配元素附加一个或更多事件处理器 $(selector).bind(event,function) $(select ...

  10. Bzoj 1657: [Usaco2006 Mar]Mooo 奶牛的歌声 单调栈

    1657: [Usaco2006 Mar]Mooo 奶牛的歌声 Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 631  Solved: 445[Submi ...