How do I change the Gradle version the Eclipse SpringSource plugin uses?

Kraagenskul picture Kraagenskul · Oct 1, 2013 · Viewed 11.2k times · Source

Note this is for the SpringSource plugin.

When I try to import a Gradle project in Eclipse I am getting the following error:

Project location doesn't exist; See error log for details.

The stacktrace error is basically this:

Caused by: java.lang.IllegalArgumentException: Project location doesn't exist

I did some research, and a Gradle defect (https://issuetracker.springsource.com/browse/STS-3158) mentions that error handling was improved with a more useful error message, including the project location.

I have Gradle 1.7 now on my machine; however Eclipse/Springsource keeps using Gradle 1.2. How do I get it to use 1.7 (or even 1.8)

Answer

Peter Niederwieser picture Peter Niederwieser · Oct 1, 2013

I recommend to check "Preferences->Gradle->Use Gradle wrapper's default" and install the Gradle Wrapper for all builds in question. Then Eclipse will automatically pick the right Gradle version for each build (and nobody has to install Gradle manually).