Saturday, 7 April 2018

Java Installing Gradle

You can install the Gradle build tool on Linux, macOS, or Windows. This document covers installing using a package manager like SDKMAN!, Homebrew, or Scoop, as well as manual installation.
To upgrade Gradle, use of the Gradle Wrapper is the recommended.
You can find all releases and their checksums on the releases page.

Prerequisites

Gradle runs on all major operating systems and requires only a Java JDK version 7 or higher to run. To check, run java -version. You should see something like this:
❯ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
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.

Installing with a package manager

SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix-based systems.
❯ sdk install gradle 4.6
Homebrew is "the missing package manager for macOS".
❯ brew install gradle
Scoop is a command-line installer for Windows inspired by Homebrew.
❯ scoop install gradle
Chocolatey is "the package manager for Windows".
❯ choco install gradle
MacPorts is a system for managing tools on macOS:
❯ sudo port install gradle

Installing manually

Step 1. Download the latest Gradle distribution

The distribution ZIP file comes in two flavors:
  • Binary-only (bin)
  • Complete (all) with docs and sources
Need to work with an older version? See the releases page.

Step 2. Unpack the distribution

Linux & MacOS users

Unzip the distribution zip file in the directory of your choosing, e.g.:
❯ mkdir /opt/gradle
❯ unzip -d /opt/gradle gradle-4.6-bin.zip
❯ ls /opt/gradle/gradle-4.6
LICENSE  NOTICE  bin  getting-started.html  init.d  lib  media

Microsoft Windows users

Create a new directory C:\Gradle with File Explorer.
Open a second File Explorer window and go to the directory where the Gradle distribution was downloaded. Double-click the ZIP archive to expose the content. Drag the content folder gradle-4.6 to your newly created C:\Gradle folder.
Alternatively you can unpack the Gradle distribution ZIP into C:\Gradle using an archiver tool of your choice.

Step 3. Configure your system environment

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 your PATH environment variable. Usually, this is sufficient to run Gradle.

Linux & MacOS users

Configure your PATH environment variable to include the bin directory of the unzipped distribution, e.g.:
❯ export PATH=$PATH:/opt/gradle/gradle-4.6/bin

Microsoft Windows users

In File Explorer right-click on the This PC (or Computer) icon, then click Properties → Advanced System Settings → Environmental Variables.
Under System Variables select Path, then click Edit. Add an entry for C:\Gradle\gradle-4.6\bin. Click OK to save.

Verifying installation

Open a console (or a Windows command prompt) and run gradle -v to run gradle and display the version, e.g.:
❯ gradle -v

------------------------------------------------------------
Gradle 4.6
------------------------------------------------------------

Build time:   2018-02-21 15:28:42 UTC
Revision:     819e0059da49f469d3e9b2896dc4e72537c4847d

Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.9 compiled on February 2 2017
JVM:          1.8.0_151 (Oracle Corporation 25.151-b12)
OS:           Mac OS X 10.13.3 x86_64
If you run into any trouble, see the section on troubleshooting installation.
You can verify the integrity of the Gradle distribution by downloading the SHA-256 file (available from the releases page) and following these verification instructions.
Spring dependency injection collections. Spring aop. Spring AOP AspectJ Xml Configuration. Spring AOP AspectJ Annotation Configuration. Spring MVC tutorial for beginners. Spring mvc framework. Spring mvc configuration file. Spring mvc hello world. Spring MVC multiple controller. Spring MVC login. Spring mvc form handling. Spring mvc exception handling. Spring spel tutorial with. Spring spel hello world. Spring spel operators. Spring spel ternary operator. Spring spel standardevaluationcontext (variable). Spring spel bean reference. Spring spel method invocation. Spring spel list, map. Spring spel regex. Hibernate tutorial. ORM overview. Hibernate framework. Hibernate architecture. Hibernate configuration file. Persistent class. Object states in Hibernate. Hibernate mapping file. Transaction management. XML mapping example. Annotation example. Collections mappings. Association mappings. Component mapping. HQL. HCQL. Named query using xml. Named query (annotation). Hibernate native SQL. JDBC tutorial. JDBC overview. JDBC driver. Steps to connect with DB. Connect to Oracle DB. Connect to MySql DB Statement. PreparedStatement. CallableStatement. Batch processing. Store file example. Retrieve file example. Store image example. Retrieve image example. ResultSetMetaData. DatabaseMetaData. Quartz scheduler tutorial. Quartz scheduler. Quartz scheduler components. Quartz 1.6 example using SimpleTrigger. Quartz 1.6 example using CronTrigger. Quartz 2.1.5 example using SimpleTrigger. Quartz 2.1.5 example using CronTrigger. Quartz 2 JobListener example. Quartz multiple jobs example. Quartz listing all jobs example. Struts 2 and Quartz 2 scheduler integration. SQL tutorial. SQL overview. Database overview. SQL Syntax. SQL data type. SQL operators. SQL CREATE Database. SHOW Database List. SQL SELECT Database. SQL DROP Database. SQL CREATE Table. SQL ALTER Table. SQL COPY Table. SQL RENAME Table. SQL DROP Table. SQL DELETE from table. SQL TRUNCATE Table. SQL CONSTRAINTS. SQL PRIMARY KEY. SQL FOREIGN KEY. SQL NOT NULL. SQL UNIQUE. SQL INDEX. SQL INSERT statement. SQL UPDATE statement. SQL SELECT statement. SQL UNIQUE keyword. SQL DISTINCT keyword. SQL SELECT TOP. SQL SELECT IN. SQL NOT IN. SQL BETWEEN. SQL NOT BETWEEN.

No comments:

Post a Comment