If you have a Java Project based on Gradle Build and you want to re-download all the dependencies that you have defined in your build.gradle file, then all you need to do is run the below command in command-line/terminal.
Steps:
- Open Command-Line/Terminal in your IDE (Eclipse/VSCode/IntelliJ)
- Move to the location of your project where you have the gradlew file.
- Now run the below gradle command
- Once the build is complete run your project to verify.
./gradlew build --refresh-dependencies
-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to Gradle,
- Task is ambiguous in root project gradle-examples. Candidates are: myTask1, myTask2
- How to create Gradle Multi-Project in IntelliJ
- Find installed Gradle version command
- Adding Jackson dependency to Java Gradle Project
- Gradle FAILURE: Build failed with an exception - Task not found in root project
- Create a Gradle Java Project in VS Code
- Generate Project Dependency tree using Gradle Command
- Fix: Spring Boot + IntelliJ + Gradle : Unsupported class file major version 64 Error
- Fix: Unsupported Java. Your build is currently configured to use Java 17.0.5 and Gradle 7.1.
- Run IntelliJ Java main method without Gradle build
- Fix: Deprecated Gradle features were used in this build, making it incompatible with Gradle
- Installing Gradle on macOS - Gradle Tutorial
- Fix: Invalid Gradle JDK configuration found. Could not find the required JavaSDK
- How to Clear Gradle Cache on Mac
- How to run Gradle build in offline mode
- Install Gradle VS Code for Java Projects
- How to add maven central repository in build.gradle
More Posts:
- How to Escape a character in a Bash command String - Bash
- How to clear cache and browsing history in Google Chrome? - Chrome
- Convert String to int in Java - Java
- How to Mount Google Drive in Colab Notebook - Google
- How to install Java OpenJDK 11 on Alpine Linux - Java
- How to create Custom RatingBar Android Programming Tutorial - Android
- 86 Gmail keyboard shortcuts that you may find Advantageous - Google
- Android appcompat_v7 Error retrieving parent for item: No resource found that matches the given name - Android