Installation
Helpful Information
- You can sign up for free live training with a Gradle core engineer bi-monthly
- Our guides and reference documentation make good reading materials
- You can visualize and debug your build with build scans
- The Gradle Newsletter is a great way to keep up-to-date with issues crafted monthly
- Command-line completion scripts are available for bash and zsh
Gradle runs on all major operating systems and requires only a Java JDK or JRE version 7 or higher to be installed. To check, run java -version
:
$ java -version
java version "1.8.0_121"
Install
Install 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.4.1
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
› Proceed to next steps
Install manually
Step 1. Download the latest Gradle distribution
The current Gradle release is version 4.4.1, released on 20 Dec 2017. The distribution zip file comes in two flavors:
- Binary-only (sha256)
- Complete, with docs and sources (sha256)
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.:
$ mkdir /opt/gradle
$ unzip -d /opt/gradle gradle-4.4.1-bin.zip
$ ls /opt/gradle/gradle-4.4.1
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.4.1
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.:
$ export PATH=$PATH:/opt/gradle/gradle-4.4.1/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.4.1\bin
. Click OK to save.
Step 4. Verify your 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.4.1
------------------------------------------------------------
› Proceed to next steps
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:
$ ./gradlew wrapper --gradle-version=4.4.1 --distribution-type=bin
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.
$ ./gradlew tasks
Downloading https://services.gradle.org/distributions/gradle-4.4.1-bin.zip
...
› Proceed to next steps
Older Releases
You can find all releases and their checksums on the releases page.
相关推荐
在Android开发过程中,Gradle是一个不可或缺的构建工具。它提供了灵活的构建脚本,使得开发者可以轻松地管理项目依赖和构建过程。本文将详细介绍如何将`Gradle.zip`解压到指定目录,并讨论其在Android开发中的作用...
首先,错误提示"Error: Could not run build action using Gradle installation (gradle 2.4, android studio)"表明Android Studio无法使用已安装的Gradle 2.4版本执行构建操作。这可能是因为Gradle的下载或更新过程...
Installation Available on the Gradle Plugins Portal: https://plugins.gradle.org/plugin/org.jmailen.kotlinter Single module Kotlin plugins { id("org.jmailen.kotlinter") version "1.21.0" } Groovy ...
https://developer.harmonyos.com/cn/docs/documentation/doc-guides/faq-installation-0000001050697674 进入.gradle > wrapper > dists > gradle-5.4.1-all目录,将下载的“gradle-5.4.1-all.zip”拷贝到该目录下...
10.1.2. Gradle Installation 10.2. Installing the Spring Boot CLI 10.2.1. Manual Installation 10.2.2. Installation with SDKMAN! 10.2.3. OSX Homebrew Installation 10.2.4. MacPorts Installation 10.2.5. ...
ndk.dir=/path/to/your/ndk/installation ``` 2. **更新Gradle插件**:Android Studio使用Gradle作为构建系统。为了使用实验性的Gradle插件支持NDK,你需要在项目的`build.gradle`(Project级别)文件中添加以下...
gradle-java-preprocessor-plugin ...Installation Add the following to your build.gradle: buildscript { repositories { jcenter() } dependencies { classpath 'wang.dannyhe.tools:plugin:latest.re
你需要什么最喜欢的文本编辑器或IDE JDK 6或更高版本安装Gradle安装Gradle 在Unix上$ sudo add-apt-repository ppa:cwchien/gradle$ sudo apt-get update$ sudo apt-get install gradle在Mac OS X上brew install ...
除此之外,还包括了如何运行并测试安装(Running and testing your installation),以及JVM相关选项(JVM options)的配置。这部分内容对于任何想要开始使用Gradle的开发者来说都是基础且关键的。 在故障排除...
Installation Gradle Add it in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { url 'https://jitpack.io' } } } Add the dependency in your app build....
Installation Gradle Add jitpack.io to your root gradle file (project level) : allprojects { repositories { ... maven { url 'https://jitpack.io' } } } Add the dependency in your app ...
Installation Gradle Mathjs is available on jitpack. Add jitpack to your root build.gradle: allprojects { repositories { ... maven { url "https://jitpack.io" } } } Add the library to app build....
Installation Add this to your module build.gradle file: dependencies { ... compile "com.github.tarek360:Animated-Icons:1.2.0" } Add this to your root build.gradle file (not your module build....
Installation Gradle Step 1. Add it in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { url 'https://jitpack.io' } } } Step 2. Add the dependency ...
Installation Gradle Step 1. Add it in your root build.gradle at the end of repositories: allprojects { repositories { maven { url 'https://jitpack.io' } } } Step 2. Add the dependency dependencies...
Duration View Duration View allows you ...Installation Gradle Add JitPack in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
SoPra RESTful服务模板 Sprint Boot 文档: : 指南: : ...Gradle安装: http : //gradle.org/installation 带有Homebrew的Mac OS X: brew install gradle 跑步 gradle bootRun 测试 gradle
Installation Edit your master gradle.build file and add maven { url 'https://jitpack.io' } to your current repositories block content (if you use other jitpack hosted libraries, then this step can be ...
1. Installation 1.1 Install AAR via Gradle Add the maven central repository to your projects build.gradle file then add a compile dependency for com.onedrive.sdk:onedrive-sdk-android:1.3 repository {...