Automatic refreshing of project dependencies

Hello good folks,

When I change the dependencies in my build file, I need to manually select the project -> Gradle -> Refresh Gradle Project, to have the new dependencies become available on my workspace project. Is there a good reason why this is not automatic (like in the maven plugin)? It may be a feature that is upcoming, but I was not able to find a story/ticket for it. If there is one, can you please share it?

Thanks and appreciate the great work being done!

1 Like

Hi

There are many things that can lead to a change in the project setup: build script changes, property changes, init script changes, changes of dynamic dependencies, etc. What we plan to have in the future is a refresh of the Eclipse project setup on any such changes. Since Gradle is the single source of truth regarding build logic, we will implement the ‘watch for changes that affect the project setup’ functionality in Gradle core and expose change events via TAPI for consumption by the IDEs.

We have no concrete plan when this functionality will be implemented and become available.

Etienne

@etiennestuder Thanks for the quick response. I am not sure if I am the only one, but this does seem like an important missing feature when working in the IDE. If there is a ticket, if many other users deem it useful, we can vote on it?

Are there any workarounds that we can add in our own build.gradle that will help us flag if there are any dependency changes (specifically rather than anything that will change the project setup). In this way, we can have a short-term way to indicate to the developers to refresh their projects, right? Also, feel free to let me know if I am approaching this in the wrong way.

Thanks for the great work so far!

Hi Mukkaram

Feel free to open a ticket, if you cannot find an existing one.

You are raising two different issues here:

  1. Auto-synchronizing the Eclipse project with the Gradle project when a change to one of the build-affecting sources is detected (typically on the file system)
  2. Indicating to other developers that they need to refresh the project that they have checked out and updated

I personally don’t know of a current solution/work-around for both those two.

Etienne

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=488946

Hi @etiennestuder
I also need such a feature, but neither Mukarram created an issue nor I have privileges to do this.
I would like to create a ticket, but don’t know how.

Everyone has the ability to open a Bug on Eclipse Bugzilla :slight_smile: But as you can see above, there already is one: