Install gradle on mac

A personal memorandum for installing gradle on your Mac. I think it's hard to forget and install the jar every time.

Apply update

$ brew update

Something is an error, so untap as written

$ brew untap homebrew/homebrew-dupes
$ brew untap homebrew/homebrew-x11

Install gradle

$ brew install gradle

Incidentally maintenance

$ brew cleanup

Move to the desired directory

Move to the directory containing build.gradle etc.

Initial processing

$ gradle

I get this

Welcome to Gradle 5.4!

Here are the highlights of this release:
 - Run builds with JDK12
 - New API for Incremental Tasks
 - Updates to native projects, including Swift 5 support

For more details see https://docs.gradle.org/5.4/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Task :help

Welcome to Gradle 5.4.

To run a build, run gradle  ...

To see a list of available tasks, run gradle tasks

To see a list of command-line options, run gradle --help

To see more detail about a task, run gradle help --task 

For troubleshooting, visit https://help.gradle.org

BUILD SUCCESSFUL in 12s
1 actionable task: 1 executed

Confirm task (do not have to)

$ gradle tasks
> Task :tasks

------------------------------------------------------------
Tasks runnable from root project
------------------------------------------------------------

Build tasks
-----------
assemble - Assembles the outputs of this project.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
classes - Assembles main classes.
clean - Deletes the build directory.
jar - Assembles a jar archive containing the main classes.
testClasses - Assembles test classes.

Build Setup tasks
-----------------
init - Initializes a new Gradle build.
wrapper - Generates Gradle wrapper files.

Documentation tasks
-------------------
javadoc - Generates Javadoc API documentation for the main source code.

Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in root project 'ArtNet for Java'.
components - Displays the components produced by root project 'ArtNet for Java'. [incubating]
dependencies - Displays all dependencies declared in root project 'ArtNet for Java'.
dependencyInsight - Displays the insight into a specific dependency in root project 'ArtNet for Java'.
dependentComponents - Displays the dependent components of components in root project 'ArtNet for Java'. [incubating]
help - Displays a help message.
model - Displays the configuration model of root project 'ArtNet for Java'. [incubating]
projects - Displays the sub-projects of root project 'ArtNet for Java'.
properties - Displays the properties of root project 'ArtNet for Java'.
tasks - Displays the tasks runnable from root project 'ArtNet for Java'.

Verification tasks
------------------
check - Runs all checks.
test - Runs the unit tests.

Rules
-----
Pattern: clean: Cleans the output files of a task.
Pattern: build: Assembles the artifacts of a configuration.
Pattern: upload: Assembles and uploads the artifacts belonging to a configuration.

To see all tasks and more detail, run gradle tasks --all

To see more detail about a task, run gradle help --task 

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed

build

$ gradle build
BUILD SUCCESSFUL in 21s
4 actionable tasks: 4 executed

If successful, a jar file will be generated in the build / libs directory. happiness.

Recommended Posts

Install gradle on mac
Install Java on Mac
Install openjdk11 on mac
Install OpenJDK 8 on mac
Install tomcat + eclipse on mac
Install Java development environment on Mac
When Gradle build stops when importing on Mac
How to install Eclipse (Photon) on Mac
I can't install rails on my mac
Install Corretto 8 on Windows
Run STS4 on Mac
Install OpenJDK on macOS
Install java and android-sdk on Mac using homebrew
Install Golang on CentOS 8
Install pyqt5 on ubuntu
Install Neo4j 4.1.3 on centOS
Install Docker on Manjaro
Install Vertica 10.0 on CentOS 6.10
Install Ruby on Ubuntu 20.04
Install Ruby / Rails on Mac M1 Big Sur 2021-01
Install Gradle with ubuntu16.04
Mac Rails Install Error
Install PostgreSQL 12 on Centos8
Install nginx on centOS7
Install lombok on SpringToolSuite4
Install SonarQube on Mac and challenge source analysis
Install Python 3 on CentOS 7
Install kuromoji on CentOS7
Install Autoware on Ubuntu 18.04.5
Install Mattermost on CentOS 7
Install PostGIS 2.5.5 on CentOS7
Install jpndistrict on CentOS 7
Install Homebrew on Ubuntu 20.04
Install Redmine 4.1.1 on CentOS 7
Smokeping Install on CentOS7
Install PostgreSQL 13 on CentOS 7.5
[Ruby] I can't install puma on Mac [Rails, etc.]
Install java and maven using brew on new mac
Install Eclipse on Mac and translate it into Japanese
Until building Spring-Boot using Eclipse on Mac (Gradle version)
I struggled with pip install on an M1 Mac
How to install Gradle and Kotlin with SDKMAN (Mac)
Install ag (the silver searcher) [on CentOS / Ubuntu / Mac]
Install Docker on Raspberry Pi
Install Docker on Windows 10 PRO
Install OpenJDK7 (JAVA) on ubuntu 14.04
Install Cybozu Office 10 on Ubuntu 20.4
Install Docker on Ubuntu Server 20.04
Install Sidekiq pro on Rails
Install rbenv on Amazon Linux
Install zabbix agent (5.0) on Ubuntu 18.04
Install MAV Proxy on Ubuntu 18.04
Install tomcat on Sakura's VPS
Install OpenFOAM v2006 on CentOS
Install Arudino IDE on Ubuntu 20
Install Java on WSL Ubuntu 18.04
Install Jenkins on Docker's CentOS
Install Ubuntu Desktop 20.10 on RaspberryPi4
Install Apache on CentOS on VirtualBox
Install Arduino IDE on Ubuntu 20.04
Install Rails on macOS Catalina