How do I refresh project dependencies using Buildship in Eclipse?

Updating the dependencies that eclipse sees should then be as simple as:

right click on project -> gradle -> refresh all

Update in buildship 1.0.16

Currently you need to jump through the delete-and-import hoop the first time you use an existing gradle project with buildship. You can now use the Add Gradle Nature option:

 right click on project -> configure -> Add Gradle Nature

“Refresh Gradle Project” is now also shown when right-clicking on any .gradle file as well as in the context menu of the Gradle editor. source

See update below However sometimes you may find that when your project was imported, it didn’t get the new Project and External Dependencies classpath entry which you would normally be able to see in your Project Properties -> Java Build Path -> Libraries
If this is indeed missing, add the following to your project’s .classpath file and all the gradle goodness should start working:

<classpathentry exported="true" kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>

Update in buildship 1.0.16

Gradle classpath container is restored if missing

When converting an existing Eclipse Java project to Gradle, the Gradle classpath container was missing. It is now always added when a project is a Java project.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)