标签:
白话解析如下:
===========
Mac 系统下载到 Gradle 压缩包后,解压到某一目录下,然后设置环境变量,命令如下:
vi ~/.profile
export GRADLE_HOME=/xxx/yyy/.../gradle-2.5 export PATH=$GRADLE_HOME/bin:$PATH
接下来测试 gradle 是否可用,新开一个终端即命令行窗口,输入:
gradle -v
------------------------------------------------------------ Gradle 2.5 ------------------------------------------------------------ Build time: 2015-07-08 07:38:37 UTC Build number: none Revision: 093765bccd3ee722ed5310583e5ed140688a8c2b Groovy: 2.3.10 Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013 JVM: 1.8.0_40 (Oracle Corporation 25.40-b25) OS: Mac OS X 10.10.4 x86_64
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 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.
You can download one of the Gradle distributions from the Gradle web site.
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.
For running Gradle, add
to your GRADLE_HOME
/binPATH
environment variable. Usually, this is sufficient to run Gradle.
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.
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.
The following tutorials introduce some of the basics of Gradle, to help you get started.
Describes how to install Gradle.
Introduces the basic build script elements: projects and tasks.
Shows how to start using Gradle‘s build-by-convention support for Java projects.
Shows how to start using Gradle‘s dependency management.
Using Gradle‘s build-by-convention support for Groovy projects.
Using Gradle‘s build-by-convention support for Web applications.
The latest release of Gradle is version 2.5, released on 8th July 2015.
Spring Boot 项目构建 之 安装 Gradle(Chapter 4. Installing Gradle)
标签:
原文地址:http://blog.csdn.net/opengl_es/article/details/47187283