🎓 Top 15 Udemy Courses (80-90% Discount): My Udemy Courses - Ramesh Fadatare — All my Udemy courses are real-time and project oriented courses.
▶️ Subscribe to My YouTube Channel (178K+ subscribers): Java Guides on YouTube
▶️ For AI, ChatGPT, Web, Tech, and Generative AI, subscribe to another channel: Ramesh Fadatare on YouTube
Step 1: Install Homebrew (If Not Already Installed)
Homebrew is a package manager for macOS that simplifies the installation of software. If you don't already have Homebrew installed, follow these steps:
Open the Terminal application.
Install Homebrew by running the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Follow the on-screen instructions to complete the installation.
Step 2: Install Gradle Using Homebrew
Open the Terminal application.
Update Homebrew to ensure you have the latest package information:
brew updateInstall Gradle by running the following command:
brew install gradle
Homebrew will download and install Gradle, along with any dependencies.
Step 3: Verify the Installation
Once the installation is complete, verify that Gradle is installed correctly by checking the version:
gradle -vYou should see an output that displays the Gradle version and other related information, indicating that Gradle is successfully installed. The output should look something like this:
------------------------------------------------------------
Gradle 7.x.x
------------------------------------------------------------
Build time: yyyy-MM-dd HH:mm:ss UTC
Revision: xxxxxxxxxxxxxxxxxxxxxx
Kotlin: 1.x.x
Groovy: 3.x.x
Ant: Apache Ant(x.x.x)
JVM: x.x.x (Oracle Corporation x.x.x)
OS: Mac OS X x.x.x x86_64
Step 4: Configure Environment Variables (Optional)
By default, Homebrew sets up the necessary environment variables for Gradle. However, if you need to configure or update environment variables manually, follow these steps:
Open the Terminal application.
Open your shell profile file in a text editor. Depending on your shell, this might be
.bash_profile,.zshrc, or another file. For example, if you use Zsh:nano ~/.zshrcAdd the following lines to set the
GRADLE_HOMEenvironment variable and update thePATH:export GRADLE_HOME=/usr/local/opt/gradle/libexec export PATH=$PATH:$GRADLE_HOME/binSave the file and exit the text editor.
Reload the shell configuration by running:
source ~/.zshrc
Conclusion
You have now successfully installed Gradle on your Mac. With Gradle installed, you can start building and managing your projects more efficiently. For more information on using Gradle, check out the official Gradle documentation.
If you encounter any issues or have any questions, feel free to ask in the comments below. Happy building!
My Top and Bestseller Udemy Courses. The sale is going on with a 70 - 80% discount. The discount coupon has been added to each course below:
Build REST APIs with Spring Boot 4, Spring Security 7, and JWT
[NEW] Learn Apache Maven with IntelliJ IDEA and Java 25
ChatGPT + Generative AI + Prompt Engineering for Beginners
Spring 7 and Spring Boot 4 for Beginners (Includes 8 Projects)
Available in Udemy for Business
Building Real-Time REST APIs with Spring Boot - Blog App
Available in Udemy for Business
Building Microservices with Spring Boot and Spring Cloud
Available in Udemy for Business
Java Full-Stack Developer Course with Spring Boot and React JS
Available in Udemy for Business
Build 5 Spring Boot Projects with Java: Line-by-Line Coding
Testing Spring Boot Application with JUnit and Mockito
Available in Udemy for Business
Spring Boot Thymeleaf Real-Time Web Application - Blog App
Available in Udemy for Business
Master Spring Data JPA with Hibernate
Available in Udemy for Business
Spring Boot + Apache Kafka Course - The Practical Guide
Available in Udemy for Business
Comments
Post a Comment
Leave Comment