Some time ago, I blogged about Gradle support in Eclipse. One feature I failed to spot was an automatic import of Gradle dependencies.

The pain point for me was that whenever I successfully built the project (in Eclipse using the Gradle plugin!) I was still getting compilation errors as the IDE wouldn’t automatically add the relevant JARs onto the build path. I would then go and add the JARs manually via the project Settings menu. Needless to say how painstakingly slow and error-prone that process was.

Turns out, Eclipse knows how to handle Gradle dependencies in a seamless way. To add all libraries your Gradle project depends on, in Eclipse:

Right-click on your project in the Package Explorer, choose Gradle and click on Refresh Gradle Project. Once the refresh is done all compilation errors should be gone.

Tested on the Mars Release (4.5.0), kudos to Peter Niederwieser for his answer on Stackoverflow.


Tomas Zezula

Hello! I'm a technology enthusiast with a knack for solving problems and a passion for making complex concepts accessible. My journey spans across software development, project management, and technical writing. I specialise in transforming rough sketches of ideas to fully launched products, all the while breaking down complex processes into understandable language. I believe a well-designed software development process is key to driving business growth. My focus as a leader and technical writer aims to bridge the tech-business divide, ensuring that intricate concepts are available and understandable to all. As a consultant, I'm eager to bring my versatile skills and extensive experience to help businesses navigate their software integration needs. Whether you're seeking bespoke software solutions, well-coordinated product launches, or easily digestible tech content, I'm here to make it happen. Ready to turn your vision into reality? Let's connect and explore the possibilities together.