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!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to Gradle,
- Run only a Single Unit Test using Gradle
- Run IntelliJ Java main method without Gradle build
- How to force re-download Gradle Dependencies
- How to Run Gradle Build Without Unit Test Cases
- Find installed Gradle version command
- Fix: Invalid Gradle JDK configuration found. Could not find the required JavaSDK
- Generate Project Dependency tree using Gradle Command
- Installing Gradle on macOS - Gradle Tutorial
- Gradle FAILURE: Build failed with an exception - Task not found in root project
- [Fix] ./gradlew: Permission denied
- Force Gradle to use specific Java JDK Version
- [fix] Deprecated gradle features were used in this build, making it incompatible with Gradle X.0
- Create a Gradle Java Project in VS Code
- Install Gradle VS Code for Java Projects
- Fix: Unsupported Java. Your build is currently configured to use Java 17.0.5 and Gradle 7.1.
- How to create Gradle Multi-Project in IntelliJ
- Fix: Spring Boot + IntelliJ + Gradle : Unsupported class file major version 64 Error
- Fix: Error: Could not find or load main class org.gradle.wrapper. GradleWrapperMain
- [fix] bash: gradlew: command not found
- [fix] Execution failed for task :core:compileJava - Could not find tools.jar
- Run Gradle Build without test cases
- How to add maven central repository in build.gradle
- Upgrade Gradle in Android Studio
- Task is ambiguous in root project gradle-examples. Candidates are: myTask1, myTask2
- Fix: Deprecated Gradle features were used in this build, making it incompatible with Gradle
More Posts:
- Elegant CSS Box Shadows Ideas - CSS
- Outlook - The mailbox isn't available. This may have occurred because the license for the mailbox has expired. - Microsoft
- How to change the tab color on Microsoft Excel on Mac - MacOS
- Understanding and Handling NullPointerException in Java: Tips and Tricks for Effective Debugging - Java
- How to create a dictionary comprehension in Python - Python
- Spring 5 IoC Example with application Context XML (ClassPathXmlApplicationContext) and Gradle. - Java
- How to Unzip a file using Python - Python
- How to find the Battery Cycle Count on macOS Ventura - MacOS