【转载】Gradle学习 第四章:安装Gradle
转载地址:http://ask.android-studio.org/?/article/16
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.
<翻译> Gradle需要安装1.6及以上版本的Java JDK或JRE(使用java -version来查看当前版本)。Gradle拥有自己的Groovy库,因此不需要另行安装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.
<翻译> Gradle使用环境变量中设置的JDK。另外,你可以设置JAVA_HOME环境变量来只想你所需要使用的JDK。
4.2. Download 下载
You can download one of the Gradle distributions from the Gradle web site.
<翻译> 你可以在Gradle网站下载。
4.3. Unpacking 解包
The Gradle distribution comes packaged as a ZIP. The full distribution contains:
<翻译> Gradle打包成了Zip包。完整版包含以下内容:
The Gradle binaries. Gradle二进制文件
The user guide (HTML and PDF). 用户向导(HTML和PDF版)
The DSL reference guide. DSL引用向导
The API documentation (Javadoc and Groovydoc). API文档(Javadoc 和 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.
<翻译> 二进制源。
4.4. Environment variables 环境变量
For running Gradle, add GRADLE_HOME/bin to your PATH environment variable. Usually, this is sufficient to run Gradle.
<翻译> 为了运行Gradle,添加GRADLE_HOME/bin到你的PATH环境变量。通常,这就足以运行Gradle。
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, JVM version, OS, etc.). The displayed Gradle version should match the distribution you have downloaded.
<翻译> 你可以通过gradle命令来运行Gradle。输入gradle -v检查Gradle是否安装正常。输出内容将显示Gradle版本和一些本地环境配置(Groovy,Java虚拟机版本,操作系统等等)。Gradle版本号应该和你下载的是匹配的。
4.6. JVM options Java虚拟机选项
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.
<翻译> 运行Gradle的Java虚拟机选项可以有环境变量来设置。你可以使用GRADLE_OPTS,JAVA_OPTS或者同时使用。JAVA_OPTS是共享给许多Java应用程序的共享环境变量。一个典型的用例就是在JAVA_OPTS中设置HTTP代理,在GRADLE_OPTS中设置内存选项。这些变量也可以设置在gradle或gradlew脚本的开头。
Note that it's not currently possible to set JVM options for Gradle on the command line.
<翻译> 备注:现在不支持使用命令行为Gradle设置Java虚拟机选项。
原文地址:http://www.gradle.org/docs/cur ... .html
翻译者:wellchang
邮箱:2483808264@qq.com如对翻译内容有异议,请在评论区提出或联系作者
【转载】Gradle学习 第四章:安装Gradle的更多相关文章
- 【转载】Gradle学习 第七章:Java快速入门
转载地址:http://ask.android-studio.org/?/article/22 7.1. The Java plugin(Java插件) As we have seen, Gradle ...
- 【转载】Gradle学习 第三章:教程
转载地址:http://ask.android-studio.org/?/article/15 3.1. Getting Started 入门The following tutorials intro ...
- 【转载】Gradle学习 第六章:构建脚本基础
转载地址:http://ask.android-studio.org/?/article/11 6.1. Projects and tasks 项目和任务Everything in Gradle si ...
- 【转载】Gradle学习 第十一章:使用Gradle命令行
转载地址:http://ask.android-studio.org/?/article/94 This chapter introduces the basics of the Gradle com ...
- 《gradle 用户指南中文版》第3章 安装 gradle
macOS 下安装 gradle,只要可以安装sdk的系统,使用sdk来安装,那么安装方式基本是一样的. Gradle在所有主要操作系统上运行,只需要安装Java JDK或JRE版本7或更高版本.要检 ...
- Gradle学习总结——抓重点学Gradle
前言 网上关于Gradle的教程很多,但很多都是以"面"切入- 通过大量讲解其用法及其API分类来阐述.但Gradle API使用技巧众多,API更是成千上百,臣妾记不住呀.个人深 ...
- Java基础知识二次学习--第四章 异常
第四章 异常处理 时间:2017年4月26日11:16:39~2017年4月26日11:28:58 章节:04章_01节 04章_02节 视频长度:20:46+01:16 内容:异常的概念 心得: ...
- C#高级编程 (第六版) 学习 第四章:继承
第四章 继承 1,继承的类型 实现继承: 一个类派生于一个基类型,拥有该基类型所有成员字段和函数. 接口继承 一个类型只继承了函数的签名,没有继承任何实现代码. 2,实现继承 class MyDe ...
- Python爬虫学习==>第四章:MySQL的安装
学习目的: 掌握MySQL数据库的安装 正式步骤 Step1:安装数据库 百度MySQL,下载软件 端口设置 设置密码,我的密码123456 下一步 下一步 查看MySQL服务器是否启动 PS:未申明 ...
随机推荐
- CentOS 8 网卡命令
nmcli n 查看nmcli状态 nmcli n on 启动nmcli nmcli c up eth0 启动网卡eth0 nmcli c down eth0 关闭网卡eth0 nmcli d c ...
- JavaMap常用操作
判断key值是否存在 map.containsKey("youkey") 根据key修改value值 map.put("youkey","you ne ...
- 洛谷 P1182 数列分段 Section II
洛谷 P1182 数列分段 Section II 洛谷传送门 题目描述 对于给定的一个长度为N的正整数数列A-iA−i,现要将其分成M(M≤N)M(M≤N)段,并要求每段连续,且每段和的最大值最小. ...
- NOIP 2016 回文日期
洛谷P2010 https://www.luogu.org/problemnew/show/P2010 JDOJ 3313 https://neooj.com:8082/oldoj/problem.p ...
- string方法介绍
#_*_coding:utf-8_*_#作者:王佃元#日期:2019/12/9#string操作print('hello'*2) #乘法操作,输出对应次数print('helloworld'[2:]) ...
- Philosopher(set 线段树合并)
直接维护乘积是肯定不可行的, 精度会爆炸, 于是我们来维护对数的和, 最后来计算最高位即可 那么转换成区间求和, 区间排序 区间排序的方式可以采用线段树维护最大递增块来解决,外层用set来维护线段树的 ...
- B1020 月饼(25分)
#include<cstdio> #include<algorithm> #include<iostream> using namespace std; struc ...
- git开发中常用命令
项目代码克隆岛本地 git clone 项目地址 #如:git clone http://cngit.fir.ai/data_service/distributedstorage.git 克隆指定分支 ...
- [LeetCode] 883. Projection Area of 3D Shapes 三维物体的投影面积
On a N * N grid, we place some 1 * 1 * 1 cubes that are axis-aligned with the x, y, and z axes. Each ...
- python运维开发常用模块(5)文件目录对比模块filecmp
1.filecmp模块介绍 当我们进行代码审计或校验备份结果时,往往需要检查原始与目 标目录的文件一致性,Python的标准库已经自带了满足此需求的模块 filecmp.filecmp可以实现文件.目 ...