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. instance norm

    与Batch Norm加快计算收敛不同, IN是在[1]中提出的,目的是提高style transfer的表现. 计算如下: \[IN(x)=\gamma (\frac{x-\mu(x)}{\sigm ...

  2. Auto.js食用指南

    Auto.js食用指南 控件点击是autojs特有的一项功能,基于安卓的无障碍功能的,在软件上有很好的支持,常用于办公软件等...... 前言: 软件选择: auto.js 8.0pro版本(对比4. ...

  3. 文盘Rust -- FFI 浅尝

    rust FFI 是rust与其他语言互调的桥梁,通过FFI rust 可以有效继承 C 语言的历史资产.本期通过几个例子来聊聊rust与C 语言交互的具体步骤. 场景一 调用C代码 创建工程 car ...

  4. 深入解析Redis的LRU与LFU算法实现

    作者:vivo 互联网服务器团队 - Luo Jianxin 重点介绍了Redis的LRU与LFU算法实现,并分析总结了两种算法的实现效果以及存在的问题. 一.前言 Redis是一款基于内存的高性能N ...

  5. IoTOS v1.0.0 开源 高效 实用 | 免费商用

    IoTOS v1.0.0 一款高效实用 IoTCard 管理 & 运营系统. IoTOS 目前取名范围过大,其主要用于IoTCard 管理业务以高效.健壮.灵活设计 SaaS.多语言.机器人推 ...

  6. 第一次用vs编译器进行第一次编程所遇问题

    首先这款编译器具有多种语言:C#.C++.Java.Python等,这对像我一样的编程小白十分友好. 然后就是我第一天编程遇到的问题: 1."printf"未被定义 int a = ...

  7. 图像处理_Retinex图像增强

    单尺度SSR (Single Scale Retinex) 图像 S ( x , y ) S(x,y) S(x,y)分解为两个不同的图像:反射图像 R ( x , y ) R(x,y) R(x,y), ...

  8. Day06_Java_作业

    A:简答题 1. 类是什么? 对象是什么?举例说明 2. 类由哪些内容组成? 3. 成员变量与局部变量的区别? 4. 什么是匿名对象?什么时候使用匿名对象? 5. 使用面向对象[封装]的好处有哪些? ...

  9. 使用 Dockerfile 构建生产环境镜像

    传统部署的坑: 1202 年了,如果你连 Docker 都不知道是什么,我建议买一本书看看--或者谷歌一下,博客已经写烂了. 为什么有这篇文章,是因为我在真正做容器化改造的时候,发现公司生产环境存在大 ...

  10. MAUI Blazor Android 输入框软键盘遮挡问题

    前言 最近才发现MAUI Blazor Android存在输入框软键盘遮挡这个问题,搜索了一番,原来这是安卓webview一个由来已久的问题,还好有大佬提出了解决方案 AndroidBug5497Wo ...