Install Gradle (Chapter 4. Installing Gradle) in Spring Boot Project Construction)

Source: Internet
Author: User

Install Gradle (Chapter 4. Installing Gradle) in Spring Boot Project Construction)

 

The vernacular Parsing is as follows:

==============

Download the Mac system to the Gradle package, decompress it to a directory, and set the environment variable. The command is as follows:

 

vi ~/.profile 

Press I to edit the mode, move the cursor down to the end with the direction key, and add the following content:

 

 

export GRADLE_HOME=/xxx/yyy/.../gradle-2.5export PATH=$GRADLE_HOME/bin:$PATH

Press ESC to exit the editing mode, enter w and press enter to save, and then enter q and press enter to exit the vi editor.

 

Next, test whether gradle is available. Open a new terminal, that is, the command line window, and enter:

 

gradle -v

After you press enter, the following content appears, indicating that the installation is successful and available:

 

 

------------------------------------------------------------Gradle 2.5------------------------------------------------------------Build time:   2015-07-08 07:38:37 UTCBuild number: noneRevision:     093765bccd3ee722ed5310583e5ed140688a8c2bGroovy:       2.3.10Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013JVM:          1.8.0_40 (Oracle Corporation 25.40-b25)OS:           Mac OS X 10.10.4 x86_64


 


Chapter 4. Installing Gradle4.1. Prerequisites

Gradle requires a Java JDK or JRE to be installed, version 6 or higher (to check, usejava -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 setJAVA_HOMEEnvironment variable to point to the installation directory of the desired JDK.

4.2. Download

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

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 policydoc ).

  • 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, addGRADLE_HOME/binTo yourPATHEnvironment variable. Usually, this is sufficient to run Gradle.

    4.5. Running and testing your installation

    You run Gradle viaGradleCommand. To check if Gradle is properly installed just typeGradle-v. The output shows the Gradle version and also the local environment configuration (Groovy, JVM version, OS, etc.). The displayed Gradle version shocould match the distribution you have downloaded.

    4.6. JVM options

    JVM options for running Gradle can be set via environment variables. You can use eitherGRADLE_OPTSOrJAVA_OPTS, Or both.JAVA_OPTSIs by convention an environment variable shared by Alibaba Java applications. A typical use case wocould be to set the HTTP proxy inJAVA_OPTSAnd the memory options inGRADLE_OPTS. Those variables can also be set at the beginning ofGradleOrGradlewScript.

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






     


    Chapter 3. Tutorials3.1. Getting Started

    The following tutorials introduce some of the basics of Gradle, to help you get started.

    Chapter 4, Installing Gradle

    Describes how to install Gradle.

    Chapter 6, Build Script Basics

    Introduces the basic build script elements: projects and tasks.

    Chapter 7, Java Quickstart

    Shows how to start using Gradle's build-by-convention support for Java projects.

    Chapter 8, Dependency Management Basics

    Shows how to start using Gradle's dependency management.

    Chapter 9, Groovy Quickstart

    Using Gradle's build-by-convention support for Groovy projects.

    Chapter 10, Web Application Quickstart

    Using Gradle's build-by-convention support for Web applications.

     

     

     

    The latest release of Gradle is version 2.5, released on 8th July 2015.

    • Complete distribution (binaries, sources and offline documentation)
    • Binary only distribution (no documentation or source code)
    • Gradle source code (just the Gradle source code; not a usable Gradle installation)

       

       

       

       

       

       

       

       

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.