Issue
I am a Java newbie here. I am thinking of a way to remove all the project dependencies.
For example in nodejs
, we can simply remove the node_module
folder and then do an npm install
.
I am using Gradle and IntelliJ IDEA
How can I do the following:
- Remove the dependencies from the project
- Re-add the dependency again
- Lastly where do I see all the dependencies along with its version number in IntelliJ
Solution
- To remove dependencies from the project, simply go to your build.gradle file and remove all the lines containing "implementation", "complie" or anything similar.
- However if you just want to remove them from cache and redownload them simply enter this command in the terminal:
gradle clean build
or in the gradle menu which you can find in the IntelliJ Sidebar press "Reload all gradle projects"
- To see the version of the dependencies you can either use "Dependencies" new feature of IntelliJ, or find them in the build.gradle file.
more info here
Answered By - Hosein Hamedi