как установить gradle на windows 10
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 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.3 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
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.:
Microsoft Windows users
Verifying 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.
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
Шаг 3 — Настройка среды для Gradle
Этот шаг зависит от платформы.
В винде —
Извлеките загруженный zip-файл с именем gradle-2.11-all.zip и скопируйте дистрибутивные файлы из каталога Downloads \ gradle-2.11 \ в C: \ gradle \ location.
В Linux —
Вы можете использовать следующее, чтобы переместить дистрибутивные файлы из Downloads / gradle-2.11 / в / opt / gradle / location. Выполните эту операцию из каталога загрузок.
Выполните следующую команду, чтобы выполнить файл
Шаг 4: Проверьте установку Gradle
В окнах:
Вы можете выполнить следующую команду в командной строке.
Вывод: там вы найдете версию Gradle.
В Linux:
Вы можете выполнить следующую команду в терминале.
Installation
The current Gradle release is 7.3. You can download binaries and view docs for all Gradle versions from the releases page.
Prerequisites
Additional resources
Installing with a package manager
SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix-based systems.
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).
› Additional helpful information
Installing manually
Step 1. Download the latest Gradle distribution
The current Gradle release is version 7.3, released on 09 Nov 2021. The distribution zip file comes in two flavors:
If in doubt, choose the binary-only version and browse docs and sources online.
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.3 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
Linux & MacOS users
Configure your PATH environment variable to include the bin directory of the unzipped distribution, e.g.:
Microsoft Windows users
Step 4. Verify your installation
› Additional helpful information
Upgrade with the Gradle Wrapper
If your existing Gradle-based build uses the Gradle Wrapper, you can easily upgrade by running the wrapper task, specifying the desired Gradle version:
Note that it is not necessary for Gradle to be installed to use the Gradle wrapper. The next invocation of gradlew or gradlew.bat will download and cache the specified version of Gradle.
› Additional helpful information
Older Releases
You can find all releases and their checksums on the releases page.
Command-Line Completion
Command-line completion scripts are available for bash and zsh. This provides completion for Gradle tasks and command-line options.
How do I install gradle on Windows 10?
I tried some ways with the path thing, but it did not work. When I edit the path in the System variables it opens up all the paths, not like in tutorials, where I should just put the ;%GRADLE_HOME%\bin at the end.
5 Answers 5
Download Gradle and unzip it to where you want it installed.
Then in Windows Search, search for «System» and then select: System (Control Panel)
Click the Advanced system settings link.
Click Environment Variables
Then click New button under user variable and add GRADLE_HOME to variable name and path pointing to the root directory of unpacked files from the Gradle to variable value.
In System variable section select Path and then click the Edit button. In next window click New button and add path pointing to the bin directory of unpacked files from the Gradle.
If you are window user then Scoop will be the best option to installs the tools you know and love. Scoop is simply a command line installer.
simply run this command scoop install gradle
But first you need to install scoop using powershell command
Note: if you get an error you might need to change the execution policy (i.e. enable Powershell) with following command
Download Gradle and unzip it to where you want it installed. Then open your USER variables window for your user (similar to what you show) and create a GRADLE_HOME variable with a path pointing to the root directory of your downloaded Gradle distribution. Then add it to the PATH in your USER variables with something like:
Notice that I have prepended the existing PATH variable onto the new one. You don’t want to remove what’s already there. Also, your image shows something else added to the path. You will want to add that on to the line above, something like:
Как установить gradle на WINDOWS 10
Я пробовал некоторые пути с помощью пути, но он не работал, потому что, когда я редактирую путь в системных переменных, он открывает все пути, не похожие на учебные пособия, где я должен просто положить:% GRADLE_HOME%\bin в конце.
ОТВЕТЫ
Ответ 1
Загрузите Gradle и разархивируйте его туда, где вы хотите его установить.
Затем в Windows Search найдите «Система», а затем выберите: «Система» (панель управления)
Нажмите ссылку «Дополнительные системные настройки».
Выберите переменные среды
Затем нажмите кнопку «Создать» под пользовательской переменной и добавьте GRADLE_HOME в имя переменной и путь, указывающий на корневой каталог распакованных файлов из Gradle на значение переменной.
В разделе «Системные переменные» выберите «Путь» и нажмите кнопку «Изменить». В следующем окне нажмите кнопку «Создать» и добавьте путь к каталогу bin распакованных файлов из Gradle.
Ответ 2
просто запустите эту команду scoop install gradle
Но сначала вам нужно установить scoop с помощью команды powershell
Примечание: если вы получаете сообщение об ошибке, вам может потребоваться изменить политику выполнения (т.е. включить Powershell) с помощью следующей команды
Ответ 3
Загрузите Gradle и разархивируйте его туда, куда вы хотите его установить. Затем откройте окно переменных USER для вашего пользователя (аналогично тому, что вы показываете) и создайте переменную GRADLE_HOME с путем, указывающим на корневой каталог вашего загруженного дистрибутива Gradle. Затем добавьте его в PATH в переменных USER с помощью чего-то вроде:
Обратите внимание, что я добавил существующую переменную PATH к новой. Вы не хотите удалять то, что уже есть. Кроме того, ваше изображение показывает что-то еще, добавленное к пути. Вы хотите добавить это в строку выше, что-то вроде:
Так что это тоже не будет потеряно.
Ответ 4
Если вы здесь, и ни один из этих ответов «не помог», попробуйте перезапустить программу оболочки. Я просто потратил больше часа, и мне просто пришлось перезапустить окно консоли, чтобы добиться цели.
Ответ 5
choco install gradle в оболочке /cmd.
конечно, сначала нужно установить шоколадку из здесь