Run gradle 3.1 project in current eclipse

I am trying to run a gradle 3.1 based project that is providing a gradle wrapper in a current and up to date eclipse. However I get this response:

“Could not create an instance of Tooling API implementation using the specified Gradle distribution ‘’.
Could not determine java version from ‘14.0.2’.”

(I guess java 14.0.2 is the java used by eclipse to startup)

Is it possible to get this running? What versions what I have to look for? Maybe use an older eclipse version? Which would be a good fit?



Hi, yeah I think the main constraint here is that the very old Gradle version won’t support the more recent Javas. (The version numbering pattern changed with Java 9, and IIRC Gradle only incrementally adds support for each JDK as they have been released since then.) Meanwhile recent Eclipse versions have moved to requiring JDK 11 as a minimum.

So yes, I would say your two options would be either to roll back to versions of Eclipse + Buildship that can still run on JDK 8, or update the project’s gradle-wrapper version to the latest with:

gradlew wrapper --gradle-version=6.6.1

Although jumping the gradle version by this much could hit issues with compatibility / planned deprecation in the build code itself. If you encounter this then for a middle-ground solution I would recommend a late 4.x Gradle version, like 4.10.2 - which should by then support Java 11. Then you can run the latest Eclipse+Buildship versions, but upon JDK 11. (Eclipse itself can still support building with higher-version JDKs than it is running on, like Java 14, but I’m not sure the older Gradle 4.x versions support that - gradle projects might be limited.)