`
IXHONG
  • 浏览: 438059 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Gradle Installation

阅读更多

 

 

Installation

Helpful Information

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:

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.

0
0
分享到:
评论

相关推荐

    SoupUI测试指南

    Gradle: A Gradle wrapper was used in all examples, which indicates that Gradle installation is unnecessary but can be done (version 2.2 was used). Browsers: Any browser should work; the main testing ...

    Android代码-kotlinter-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 ...

    gradle-5.4.1-all.zip 文件下载

    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”拷贝到该目录下...

    spring-boot-reference.pdf

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

    Android代码-gradle-java-preprocessor-plugin

    gradle-java-preprocessor-plugin ...Installation Add the following to your build.gradle: buildscript { repositories { jcenter() } dependencies { classpath 'wang.dannyhe.tools:plugin:latest.re

    java-hello-world-with-gradle:带有gradle的Java hello世界示例

    你需要什么最喜欢的文本编辑器或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 ...

    Android代码-适用于Android的自定义导航抽屉库

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

    Android代码-一个快速方便地访问Android Shared preferences 库。

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

    Android代码-mathjs-android

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

    Android代码-Animated-Icons

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

    Android代码-自定义安全键盘

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

    Android代码-自定义View组织机构图 和层次图

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

    Android代码-用美丽的方式描述Android应用程序的持续时间。

    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' } } }

    imhotep-server:服务器端存储库,用于实施棋盘游戏

    SoPra RESTful服务模板 Sprint Boot 文档: : 指南: : ...Gradle安装: http : //gradle.org/installation 带有Homebrew的Mac OS X: brew install gradle 跑步 gradle bootRun 测试 gradle

    Android代码-Android PinCode 密码输入效果

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

    Android代码-onedrive-sdk-android

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

    Android代码-Rss-Manager

    Installation Add this to your project level build.gradle file. repositories { maven { url "https://jitpack.io" } } Add this to your app level build.gradle file. dependencies { compile ('...

    Android代码-EasyTabs

    Installation Add the jitpack source in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { url 'https://jitpack.io' } } } Add the dependency in your app ...

    Android代码-SplashScreen

    Installation Up to now, the library is only available in JitPack. Please add this code to your build.gradle file on project level: allprojects { repositories { ... maven { url '...

    Android代码-DBC-Android

    Installation Add the JitPack repository to your root build.gradle: allprojects { repositories { ... maven { url "https://jitpack.io" } } } In your module's build.gradle file, add the dependency: ...

Global site tag (gtag.js) - Google Analytics