Gradle install on windows

Gradle — Installation

Gradle is a build tool based on java. There are some prerequisites that are required to be installed before installing the Gradle frame work.

Prerequisites to install Gradle

JDK and Groovy are the prerequisites for Gradle installation.

Gradle requires JDK version 6 or later to be installed in the system. It uses the JDK libraries which are installed, and sets to the JAVA_HOME environmental variable.

Gradle carries its own Groovy library, therefore, we need not install Groovy explicitly. If it is installed, that is ignored by Gradle.

The steps to install Gradle in your system are explained below.

Step 1 − Verify JAVA Installation

First of all, you need to have Java Software Development Kit (SDK) installed on your system. To verify this, execute Java –version command in any of the platform you are working on.

In Windows

Execute the following command to verify Java installation. I have installed JDK 1.8 in my system.

The output is as follows −

In Linux

Execute the following command to verify Java installation.We have installed JDK 1.8 in the system.

We assume the readers of this tutorial have Java SDK version 1.8.0_66 installed on their system.

Step 2 − Download Gradle Build File

Download the latest version of Gradle from the link available at https://gradle.org/install/. In the reference page, click on the Complete Distribution link. This step is common for any platform. For this you will get the complete distribution file into your Downloads folder.

Step 3 − Set Up Environment for Gradle

Setting up environment means, we have to extract the distribution file and copy the library files into proper location. Set up GRADLE_HOME and PATH environmental variables. This step is platform dependent.

In Windows

Extract the downloaded zip file named gradle-2.11-all.zip and copy the distribution files from Downloads\gradle-2.11\ to C:\gradle\ location.

After that, add the C:\gradle and C:\gradle\bin directories to the GRADLE_HOME and PATH system variables.

Follow the given instructions − Right Click On My Computers -> Click On Properties -> Advanced System Settings -> Click On Environmental Variables.

There you will find a dialog box for creating and editing system variables.

Click on new button for creating GRADLE_HOME variable (follow the left side screenshot).

Click on Edit for editing the existing Path system variable (follow the right side screenshot).

Follow the below given screenshots.

In Linux

Extract the downloaded zip file named gradle-2.11-all.zip then you will find an extracted file named gradle-2.11.

You can use the following to move the distribution files from Downloads/gradle-2.11/ to /opt/gradle/ location. Execute this operation from the Downloads directory.

/.bashrc file and paste the following content to it and save it.

Execute the following command to execute

Step 4 − Verify the Gradle installation

In windows

You can execute the following command in command prompt.

Читайте также:  Как вернуть значок windows 10 трее

Here you will find the Gradle version.

In Linux

You can execute the following command in terminal.

Here you will find the Gradle version.

In Linux

You can execute the following command in terminal.

Gradle

Gradle 7.0 LATEST

Windows Vista / Windows 7 / Windows 8 / Windows 10

Gradle 2021 full offline installer setup for PC 32bit/64bit

Gradle is an open-source build automation tool for Windows PC focused on flexibility and performance. The app build scripts are written using a Groovy or Kotlin DSL.

Write in Java, C++, Python, or your language of choice. Package for deployment on any platform. Go monorepo or multi-repo. And rely on Gradle‘s unparalleled versatility to build it all.

  • Highly customizable — The app is modeled in a way that is customizable and extensible in the most fundamental ways.
  • Fast — Gradle completes tasks quickly by reusing outputs from previous executions, processing only inputs that changed, and executing tasks in parallel.
  • Powerful — Gradle is the official build tool for Android, and comes with support for many popular languages and technologies.

Use Gradle‘s rich API and mature ecosystem of plugins and integrations to get ambitious about automation. Model, integrate, and systematize the delivery of your software from end to end.

Scale-out development with elegant, blazing-fast builds. From compile avoidance to advanced caching and beyond, It pursues performance relentlessly so your team can deliver continuously.

It supports many major IDEs, including Android Studio, Eclipse, IntelliJ IDEA, Visual Studio, and XCode. You can also invoke Gradle via its command-line interface in your terminal or through your continuous integration server. The app build scans help you understand build results, improve build performance, and collaborate to fix problems faster.

Installing Gradle

You can install the Gradle build tool on Linux, macOS, or Windows. This document covers installing using a package manager like SDKMAN! or Homebrew, as well as manual installation.

Use of the Gradle Wrapper is the recommended way to upgrade Gradle.

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 Development Kit version 8 or higher to run. To check, run java -version . You should see something like this:

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-like systems (macOS, Linux, Cygwin, Solaris and FreeBSD). We deploy and maintain the versions available from SDKMAN!.

Homebrew is «the missing package manager for macOS».

Other package managers are available, but the version of Gradle distributed by them is not controlled by Gradle, Inc. Linux package managers may distribute a modified version of Gradle that is incompatible or incomplete when compared to the official version (available from SDKMAN! or below).

Installing manually

Step 1. Download the latest Gradle distribution

The distribution ZIP file comes in two flavors:

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

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-7.0 to your newly created C:\Gradle folder.

Читайте также:  Генератор звуковой частоты для windows

Alternatively, you can unpack the Gradle distribution ZIP into C:\Gradle using an archiver tool of your choice.

Step 3. Configure your system environment

To run Gradle, the path to the unpacked files from the Gradle website need to be on your terminal’s path. The steps to do this are different for each operating system.

Linux & MacOS users

Configure your PATH environment variable to include the bin directory of the unzipped distribution, e.g.:

Alternatively, you could also add the environment variable GRADLE_HOME and point this to the unzipped distribution. Instead of adding a specific version of Gradle to your PATH , you can add $GRADLE_HOME/bin to your PATH . When upgrading to a different version of Gradle, just change the GRADLE_HOME environment variable.

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-7.0\bin . Click OK to save.

Alternatively, you could also add the environment variable GRADLE_HOME and point this to the unzipped distribution. Instead of adding a specific version of Gradle to your Path , you can add %GRADLE_HOME%/bin to your Path . When upgrading to a different version of Gradle, just change the GRADLE_HOME environment variable.

Verifying installation

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

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.

Next steps

Now that you have Gradle installed, use these resources for getting started:

Create your first Gradle project by following one of our step-by-step samples.

Sign up for a live introductory Gradle training with a core engineer.

Learn how to achieve common tasks through the command-line interface.

Configure Gradle execution, such as use of an HTTP proxy for downloading dependencies.

Subscribe to the Gradle Newsletter for monthly release and community updates.

Gradle — Установка

Gradle — это инструмент для сборки, основанный на Java. Есть некоторые предварительные условия, которые должны быть установлены перед установкой рамы Gradle.

Предпосылки

JDK и Groovy являются необходимыми условиями для установки Gradle.

Gradle требует JDK версии 6 или более поздней версии для установки в вашей системе. Он использует библиотеки JDK, которые установлены и установлены в переменную окружения JAVA_HOME.

Gradle содержит собственную библиотеку Groovy, поэтому нам не нужно явно устанавливать Groovy. Если он установлен, Gradle игнорирует его.

Gradle требует JDK версии 6 или более поздней версии для установки в вашей системе. Он использует библиотеки JDK, которые установлены и установлены в переменную окружения JAVA_HOME.

Gradle содержит собственную библиотеку Groovy, поэтому нам не нужно явно устанавливать Groovy. Если он установлен, Gradle игнорирует его.

Ниже приведены инструкции по установке Gradle в вашей системе.

Шаг 1 — Проверьте установку JAVA

Прежде всего, вам необходимо установить Java Software Development Kit (SDK) в вашей системе. Чтобы убедиться в этом, выполните команду Java –version на любой платформе, с которой вы работаете.

В винде —

Выполните следующую команду, чтобы проверить установку Java. Я установил JDK 1.8 в моей системе.

В Linux —

Выполните следующую команду, чтобы проверить установку Java. Я установил JDK 1.8 в моей системе.

Мы предполагаем, что читатели этого руководства установили Java SDK версии 1.8.0_66 в своей системе.

Шаг 2 — Загрузите файл сборки Gradle

Загрузите последнюю версию Gradle по ссылке Download Gradle . На странице ссылок нажмите на ссылку Полный дистрибутив . Этот шаг является общим для любой платформы. Для этого вы получите полный дистрибутивный файл в папку «Загрузки».

Читайте также:  Как запустить usb клавиатуру до windows

Шаг 3 — Настройка среды для Gradle

Настройка среды означает, что мы должны извлечь дистрибутивный файл, скопировать файлы библиотеки в нужное место. Настройка переменных среды GRADLE_HOME и PATH .

Этот шаг зависит от платформы.

В винде —

Извлеките загруженный zip-файл с именем gradle-2.11-all.zip и скопируйте дистрибутивные файлы из каталога Downloads \ gradle-2.11 \ в C: \ gradle \ location.

После этого добавьте каталоги C: \ gradle и C: \ gradle \ bin в системные переменные GRADLE_HOME и PATH . Следуйте приведенным инструкциям, щелкнув правой кнопкой мыши на моих компьютерах -> выберите свойства -> дополнительные параметры системы -> нажмите переменные среды . Там вы найдете диалоговое окно для создания и редактирования системных переменных. Нажмите на новую кнопку для создания переменной GRADLE_HOME (следуйте скриншоту слева). Нажмите на Edit для редактирования существующей системной переменной Path (следуйте скриншоту справа). Следуйте приведенным ниже скриншотам.

В Linux —

Распакуйте загруженный zip-файл с именем gradle-2.11-all.zip, после чего вы найдете извлеченный файл с именем gradle-2.11 .

Вы можете использовать следующее, чтобы переместить дистрибутивные файлы из Downloads / gradle-2.11 / в / opt / gradle / location. Выполните эту операцию из каталога загрузок.

/ .bashrc, вставьте в него следующее содержимое и сохраните его.

Выполните следующую команду, чтобы выполнить файл

Шаг 4: Проверьте установку Gradle

В окнах:

Вы можете выполнить следующую команду в командной строке.

Вывод: там вы найдете версию Gradle.

В Linux:

Вы можете выполнить следующую команду в терминале.

Gradle Tutorial — How to install Gradle on Windows

The installation instructions for Gradle on their site at http://www.gradle.org/installation is okay for a beginner, but could be better. If you followed the very simple instructions on their site, then you may have run into some trouble and would have to do some searching on the internet to find out why you weren’t getting anything from typing gradle -v into the command prompt. Here are the full steps to get Gradle working without worries!

Difficulty — Beginners

It’ll be a piece of cake. This cake is no lie.

Prerequisites

  • Windows 8 (or any Windows version)
  • Java JDK installed

Instructions

  1. Download Gradle at their site: http://www.gradle.org/downloads.
  2. Unzip the package to anywhere you want to keep it. I normally put these kinds of things in my development directory where other goodies go into also.
  3. Now, right click on «Computer» (a.k.a. «My Computer») and then select «Properties»:

  1. Then click on «Advance system settings»:

  1. Now, you should already be on the «Advanced» tab, so click on «Environment Variables. «:

  1. Then we want to add a new user variable for us called JAVA_HOME . Click on «New. » as shown below:

  1. Now enter JAVA_HOME into the input field for «Variable name:»:

  1. For «Variable value:», we want to enter the location of your Java JDK directory. The Java JDK on my computer is located in it’s default installation location, C:\Program Files\Java\jdk1.8.0_25 :

  1. When finished, click «OK».
  2. Under «System variables», look for the «Variable» called Path

  1. Now we want to add additional paths to our PATH environment variable, so let’s click on «Edit. » under «System variables» as shown below:

  1. Then proceed to the end of the value and enter the \bin locations of both Gradle and the Java JDK.

  1. For Gradle , I entered it as C:\gradle-2.1\bin . For the Java JDK, enter only %JAVA_HOME%\bin because %JAVA_HOME% will use the user variable we defined earlier to get your Java JDK directory for you.

  1. After you’re done entering the new bin paths for Gradle and the Java JDK, click «OK». Click «OK» a couple more times to back out.
  2. Now, let’s test it out. Open up command prompt and type gradle -v and you should see something similar:
Оцените статью