Chapter 4. Installing Gradle

4.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 not need to be installed. Any existing Groovy installation is ignored by Gradle.(jdk jre 6 以上的版本,)

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.(jdk配置 path)

4.2. Download

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

4.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 theGradle web site for details.

4.4. Environment variables

For running Gradle, add GRADLE_HOME/bin to your PATH environment variable. Usually, this is sufficient to run Gradle.(配置环境变量GRADLE_HOME

4.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 environment configuration (groovy and JVM version, etc.). The displayed Gradle version should match the distribution you have downloaded.   cdm   gradle -v.  测试安装情况

4.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 thegradle or gradlew script.

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

Installing Gradle的更多相关文章

  1. Chapter 3. Installing Gradle 安装gradle

    3.1. Prerequisites Gradle requires a Java JDK or JRE to be installed, version 6 or higher (to check, ...

  2. 【转载】Gradle学习 第三章:教程

    转载地址:http://ask.android-studio.org/?/article/15 3.1. Getting Started 入门The following tutorials intro ...

  3. Gradle实战(01)--介绍与安装

    前言 本章你将学习到 Gradle的介绍 Gradle的安装 Gradle的hello world 1 Gradle的介绍 Gradle是专注于灵活性和性能的开源构建自动化工具 Gradle构建脚本是 ...

  4. 收藏的技术文章链接(ubuntu,python,android等)

    我的收藏 他山之石,可以攻玉 转载请注明出处:https://ahangchen.gitbooks.io/windy-afternoon/content/ 开发过程中收藏在Chrome书签栏里的技术文 ...

  5. Windows 安装 Scoop

    Scoop介绍 scoop是Windows下的包管理工具 安装环境要求 1,操作环境:win10 2,确保你的 PowerShell 版本 >= 3. win7或许低于3,得升级.如何确认Pow ...

  6. Rancher之Pipeline JAVA demo

    Rancher Pipeline Pipeline,简单来说,就是一套运行于Rancher上的工作流框架,将原本独立运行于单个或者多个节点的任务连接起来,实现单个任务难以完成的复杂发布流程. Ranc ...

  7. Gradle2.0用户指南翻译——第三章. 教程

    翻译项目请关注Github上的地址:https://github.com/msdx/gradledoc本文翻译所在分支:https://github.com/msdx/gradledoc/tree/2 ...

  8. Scoop - 在Windows命令行上进行程序安装

    2019-01-28  22:49:21 资料来源自Scoop官方网站以及github上的帮助文档 如果有疑惑或者觉得文章有错误请留言以帮助改正 补充内容(2019-04-09 21:11:36):不 ...

  9. 错误异常 (1)Android Studio错误提示:Gradle project sync failed. Basic functionality (eg. editing, debugging) will not work properly

    [已解决]Android Studio错误提示:Gradle project sync failed. Basic functionality (eg. editing, debugging) wil ...

  10. android studio1.0 for Mac环境搭建与demo运行(手动下载gradle,科学上google) 转载

    http://blog.csdn.net/allenffl/article/details/41957907 官网下载 http://developer.android.com/sdk/install ...

随机推荐

  1. C++面试八股文:std::string是如何实现的?

    某日二师兄参加XXX科技公司的C++工程师开发岗位第18面: 面试官:std::string用过吧? 二师兄:当然用过(废话,C++程序员就没有没用过std::string的). 面试官:std::s ...

  2. 现代C++学习指南-类型系统

    在前一篇,我们提供了一个方向性的指南,但是学什么,怎么学却没有详细展开.本篇将在前文的基础上,着重介绍下怎样学习C++的类型系统. 写在前面 在进入类型系统之前,我们应该先达成一项共识--尽可能使用C ...

  3. docker-compose单服务器部署ELK

    docker-compose 部署ELK 本项目采用的ELK版本为6.5.3,7.0+ 以上的版本部分配置不适合,请查看docker-compose多服务器部署ELK文章 目录结构 elk |--do ...

  4. 驱动开发:应用DeviceIoContro模板精讲

    在笔者上一篇文章<驱动开发:应用DeviceIoContro开发模板>简单为大家介绍了如何使用DeviceIoContro模板快速创建一个驱动开发通信案例,但是该案例过于简单也无法独立加载 ...

  5. 【EF Core】实体的主、从关系

    假设有以下两个实体: public class Student { public int StuID { get; set; } public string? Name { get; set; } p ...

  6. 可视化容器管理工具-portainer.io使用

    续docker日常使用指南 背景 当我们开始使用docker后,我们的机器上镜像和容器会越来越多,或者有时候我们有多台开发机的时候,单纯使用命令行去管理镜像和容器就变得麻烦了,这时,我们就可以选择一些 ...

  7. ES插入数据(JAVA代码)

    创建ES连接 // 初始化api客户端 public static RestHighLevelClient client = new RestHighLevelClient( RestClient.b ...

  8. Stable Diffusion修复老照片-图生图

    修复老照片的意义就不多说了,相信大家都明白,这里直接开讲方法. 1.原理 这个方法需要一个真实模型,以便让修复的照片看起来比较真实,我这里选择:realisticVisionV20,大家有更好的给我推 ...

  9. [Spring+SpringMVC+Mybatis]框架学习笔记:前言_目录

    下一章:[Spring+SpringMVC+Mybatis]框架学习笔记(一):SpringIOC概述 前言 本笔记用于记录本人(Steven)的SSM框架学习历程,仅用作学习.交流,不用于商业用途, ...

  10. 【WebGL系列-03】获取shader变量地址及赋值

    获取shader变量地址及赋值 上一节创建了WebGL程序对象,创建好program对象后,对象中包含顶点着色器和片元着色器,着色器中含有变量,我们需要对其进行赋值后才能够进行绘制. 着色器代码如下: ...