Step 1: Download Gradle
- Visit the Gradle Releases page.
- Click on the "Binary-only" link to download the latest version of Gradle. The distribution will be downloaded as a ZIP file.
Step 2: Extract the ZIP File
- Once the download is complete, locate the ZIP file in your Downloads folder.
- Right-click on the ZIP file and select "Extract All..." to extract its contents.
- Choose a destination folder for the extracted files. For example, you might choose
C:\Gradle
.
Step 3: Set Up Environment Variables
To use Gradle from the command line, you need to set up the GRADLE_HOME
environment variable and add Gradle's bin
directory to your PATH
.
Open Environment Variables:
- Press
Win + X
and select "System". - Click on "Advanced system settings" on the left.
- In the System Properties window, click on the "Environment Variables..." button.
- Press
Create
GRADLE_HOME
Variable:- In the Environment Variables window, click "New..." under the "System variables" section.
- Enter
GRADLE_HOME
as the variable name. - Enter the path to the Gradle folder (e.g.,
C:\Gradle\gradle-<version>
) as the variable value. - Click "OK".
Update
PATH
Variable:- In the Environment Variables window, find the
Path
variable under the "System variables" section and select it. - Click "Edit...".
- Click "New" and add the path to the Gradle
bin
directory (e.g.,C:\Gradle\gradle-<version>\bin
). - Click "OK" to close all dialog boxes.
- In the Environment Variables window, find the
Step 4: Verify the Installation
- Open a new Command Prompt window to ensure the environment variables are refreshed.
- Type
gradle -v
and press Enter.
You should see an output that displays the Gradle version and other related information, indicating that Gradle is successfully installed.
------------------------------------------------------------
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: Windows 11 xxxxx amd64
Conclusion
You have now successfully installed Gradle on Windows 11. 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!
Comments
Post a Comment
Leave Comment