【转载】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:未申明 ...
随机推荐
- jmeter引用jar包的3种方式
示例 实现对登录密码进行MD5加密 pom文件依赖 <!-- https://mvnrepository.com/artifact/commons-codec/commons-codec --& ...
- js中,null, '',undefined的区别
在js中有三种值都可以代表false "",null,undefined 那么他们之间到底有什么区别呢 首先我们先看这三种值得类型 ""代表了一个没有字符的字 ...
- Dubbo介绍(一)
Dubbo是一个分布式.高性能.透明化的 RPC 服务框架,作用是提供服务自动注册.自动发现等高效服务治理方案. 一.Dubbo架构图 Provider:提供者,服务发布方 Consumer:消费者, ...
- git clean (11)
#delete untracked files git clean -f # delete untracked files and directories git clean -fd # -n opt ...
- Codeforces Global Round 2 D 差分 + 前缀和 + 二分
https://codeforces.com/contest/1119/problem/D 题意 有n个数组,每个数组大小为\(10^{18}+1\)且为等差数列,给出n个数组的\(s[i]\),q次 ...
- [LeetCode] 592. Fraction Addition and Subtraction 分数加减法
Given a string representing an expression of fraction addition and subtraction, you need to return t ...
- LoadRunner名词解释
Transactions(用户事务分析):用户事务分析是站在用户角度进行的基础性能分析. 1.Transation Sunmmary(事务综述) 对事务进行综合分析是性能分析的第一步,通过分析测试时间 ...
- DVWA CSRF 通关教程
CSRF 介绍 CSRF,全称Cross-site request forgery,即跨站请求伪造,是指利用受害者尚未失效的身份认证信息(cookie.会话等),诱骗其点击恶意链接或者访问包含攻击代码 ...
- GreenPlum 大数据平台--segment 失效问题排查
01,segment 检查一: 在master节点上检查失效的segment 正常情况下: :::: gpstate:greenplum01:gpadmin-[INFO]:-Starting gpst ...
- .NET Core WebApi帮助文档使用Swagger生成Api说明文档
Swagger也称为Open API,Swagger从API文档中手动完成工作,并提供一系列用于生成,可视化和维护API文档的解决方案.简单的说就是一款让你更好的书写API文档的框架. 我们为什么选择 ...