星空网 > 软件开发 > 操作系统

Chapter 3. Installing Gradle

3.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

//gradle需要安装jdk或者jre,版本在6以上

not need to be installed. Any existing Groovy installation is ignored by Gradle.

//gradle有自己的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.


3.2. Download




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


3.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 the Gradle web site for details.



3.4. Environment variables




For running Gradle, firstly add the environment variable GRADLE_HOME. This should point to the unpacked files from the Gradle website. Next add GRADLE_HOME/bin to yourPATH environment variable. Usually, this is sufficient to run Gradle.


3.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

//使用gradle -v命令输出gradle版本内容来检查gradle是否正确安装

environment configuration (Groovy, JVM version, OS, etc.). The displayed Gradle version should match the distribution you have downloaded.


3.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 the gradle or gradlew script.

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





原标题:Chapter 3. Installing Gradle

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

南皮专线:https://www.goluckyvip.com/tag/97852.html
南海专线物流:https://www.goluckyvip.com/tag/97853.html
商南专线:https://www.goluckyvip.com/tag/97854.html
南雄专线:https://www.goluckyvip.com/tag/97855.html
东丰专线:https://www.goluckyvip.com/tag/97856.html
克东专线:https://www.goluckyvip.com/tag/97857.html
TEMU亚马逊美国站ASTMF3186-17、16CFR1270成人活动床栏安全要求:https://www.kjdsnews.com/a/1836339.html
一线丨访曹县产业带,看中国传统服饰出海如何杀出一个春天?:https://www.kjdsnews.com/a/1836340.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流