Duplicate work between commandline and eclipse

Hi,

I have checked out a project in commandline and build it with gradlew testClasses.
Afterwards I import it with eclipse buildship (latest as well as older versions) in my eclipse instance.
When importing the build downloads gradle wrapper and dependencies, which I do not expect. From my point of view these infos are already downloaded by the commandline build.
Everytime I change the branch and rebuild on commandline dependencies which are changed in the new branch are redownloaded, which is OK. But when I refresh this project in eclipse again, it seems to check the deps and download it again in the IDE.

Can you explain this behaviour? Is it the expected one?
What can I do to avoid duplicate work at this point?
And can you please give me advice, which task is called when do the “Refresh Gradle Project”?

Looking forward hearing from you.
Cheers
Markus

The Gradle wrapper and dependency downloads are per GRADLE_USER_HOME, which defaults to ~/.gradle. You didn’t say which OS you are using, but this is easy to cause if you’re running one of them As Administrator on Windows or using sudo on Mac/Linux.

Another possibility, but wouldn’t impact the wrapper, is the downloading of source JARs. This will make the IDE appear to be downloading everything again, but it’s really the source JARs used for navigating to the original source code of the dependency, not the binary JARs used by the build.

Hi James,
I am working on a mac, but also have to check for collegues working on windows, so I have also set up an vm with windows.

Thanks a lot for this information. I will take a deeper look the next days, what’s the problem right now with my setup. Maybe I missed that source jars are reloaded