首页 > 其他分享 >Gradle Installation

Gradle Installation

时间:2024-09-13 15:48:14浏览次数:1  
标签:bin Installation Gradle version Path distribution your

Prerequisites

Gradle runs on all major operating systems. It requires Java Development Kit (JDK) version 8 or higher to run. You can check the compatibility matrix for more information.

To check, run java -version:

❯ java -version
openjdk version "11.0.18" 2023-01-17
OpenJDK Runtime Environment Homebrew (build 11.0.18+0)
OpenJDK 64-Bit Server VM Homebrew (build 11.0.18+0, mixed mode)

Gradle uses the JDK which is

  • in your path
  • used by your IDE
  • specified by your project

NOTICE
Gradle supports Kotlin and Groovy as the main build languages. Gradle ships with its own Kotlin and Groovy libraries, therefore they do not need to be installed. Existing installations are ignored by Gradle.

Installation

Step 1 - Download the latest Gradle distribution

The distribution ZIP file comes in two flavors:

  • Binary-only (bin)
  • Complete (all) with docs and sources

We recommend downloading the bin file.

Step 2 - Unpack the distribution

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

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

Step 3 - Configure your system environment

To install Gradle, the path to the unpacked files needs to be in your Path.

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

Alternatively, you can 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.

标签:bin,Installation,Gradle,version,Path,distribution,your
From: https://www.cnblogs.com/matroleox/p/18412301

相关文章

  • 解决Android Studio不能下载Gradle的教程Could not install Gradle distribution from
    在使用AndroidStudio时,经常会碰到与Gradle相关的问题,其中一个较为常见的情况就是在加载Gradle的时候,无论是第一次下载Gradle还是导入Gradle,都可能会遭遇报错。尤其是在下载过程中,一旦遇到网络问题,就很容易导致下载超时而报错,给开发者带来极大的困扰。带来两个解决AndroidS......
  • 卸载IBM Installation Manager的失败提示及解决方式
    1、问题描述如上图所示,按常规方式卸载IBMInstallationManager失败,并出现相关提示信息。在卸载IBMInstallationManager之前,必须卸载由它安装的所有产品。2、原因分析安装IBM的相关软件时,还附带安装了LicenseKeyAdministrator,因此需要先卸载LicenseKeyAdmini......
  • 配置Gradle使用国内镜像加速依赖下载
      目录修改 settings.gradle 文件 修改 build.gradle 文件配置全局Gradle设置   要在Gradle项目中配置使用国内镜像,可以采取以下步骤来全局替换默认的仓库为国内可用的镜像源。这里假设想将Maven中央仓库等默认仓库更换为阿里云、清华大学或者其他的国内镜......
  • 2024最新最全【Android Studio 】下载及安装和【Gradle配置】零基础入门到精通
    文章目录下载安装修改Sdk的位置创建项目修改Gradle的位置查看AS版本工具栏–View项工具栏–Build下的功能说明BuildVariants视图说明下载模拟器(avd)/安卓虚拟设备屏幕熄灭功能关闭虚拟设备功能删除自己开发的应用软件将开发的应用运行到虚拟设备上。修改模拟器的位置下......
  • Android Gradle 插件的说明
    1、前天运行好好的项目,今天运行就报错:这个意思是Gradle版本低了这个意思是Gradleplugin(8.5.1)最高的compileSdk=34,用了35,就不对,因为一开始我们安装的就是35的版本,我们可以安装下34,然后用34就可以了。2、GradlePlugin这是一种写法,我们也可以这样,用alias,用一个文件......
  • Python Poetry fails to add openai-whisper due to triton installation error
    题意:PythonPoetry因Triton安装错误而无法添加openai-whisper。问题背景:soimtryingtouseopenai-whisper.i'musingpoetryasmyenvanddependecymanager.butkeepgettingerrorswhentryingtodownloadit.theerrorigetis,Installingtriton(2.0.......
  • Gradle下载失败或者慢怎么办
            在AndroidStudio开发过程中,经常需要下载Gradle构建工具来构建项目。然而,由于网络限制或国际镜像服务器响应慢,Gradle的下载过程可能会非常缓慢甚至失败。为了优化这一过程,我们可以采用国内的Gradle镜像来加速下载。同时,针对Maven仓库的依赖下载,也可以通过配置......
  • Gradle配置全局替换国内镜像(2024版)
    Gradle配置全局替换国内镜像(2024版)Gradle作为一款广泛使用的自动化构建工具,在处理Java、Kotlin等项目的依赖管理和构建过程中起着至关重要的作用。然而,由于网络环境的差异,直接使用Gradle默认的国际仓库可能会导致下载速度缓慢甚至连接失败。为了解决这一问题,配置Gradle使......
  • 一起学Java(3)-Java项目构建工具Gradle和Maven场景定位和优缺点对比
    在第一步创建的项目(java-all-in-one)项目里,我们提到了使用Gradle作为项目构建工具。看到这里,不知道你是否有疑惑,什么是项目构建工具。Java项目常用构建工具有哪些?都有什么特点?带着疑惑,本文对Java的构建工具进行一些梳理,以同步理解。从而使大家对我们项目中使用到的技术栈和技术......
  • Gradle编译项目Druid找不到tools.jar和jconsole.jar
     原因:jdk11之后不支持druid的两个依赖方法一:<dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId><version>1.2.5</version>方法二:<!--<exclusions><exclusion><gro......