Gradle 2.0 will drop support for Java 5 and will fully support Java 8


(Hans Dockter) #1

As part of the upcoming Gradle 2.0 release you will no longer be able to run Gradle from a Java 5 runtime. You will of course still be able to build projects using Java 5 as a target platform.

They are good reasons to drop support for Java 5. Quite a few the libraries we use inside Gradle no longer support Java 5 in newer version. Furthermore, only a very small fraction of our community is using Java 5 for running Gradle.

However we are not completely happy with this situation. Usually we would give you at least a 6-12 months notice period for such a change, but in this case this was not possible.

Our DSL engine is based on Groovy. Different versions of Groovy require different versions of the Java Runtime. The latest version of Groovy, Groovy 2.3, can’t run on Java 5. It is also the first version of Groovy that fully supports Java 8. Something we were eagerly awaiting. The Groovy team decided, unnoticed by us, to drop Java 5 support between the beta and the first RC of the 2.3 work. We are talking with our friends from the Groovy team about better mechanisms so that the Gradle team will be aware of such changes earlier in the future.

Basically we have to decide now whether Gradle should run on Java 5 or without limitations on Java 8. Obviously, and as shown by our stats, Java 8 support is much more important than Java 5 support. So with Gradle 2.0 we will switch to Groovy 2.3. This means you will not be able to run Gradle 2.0 from a Java 5 runtime. Again, you will still be able to build projects for the Java 5 platform.


(Andrew Oberstar) #2

Any chance of better support for decoupling the Java version that Gradle runs under and the Java version that you compile with? I know its possible now, but it’s pretty inconvenient.


(Luke Daley) #3

That’s on our list. We wanted to get this done before dropping Java 5, but we don’t have that option after the Groovy change.


(Andrew Oberstar) #4

Awesome, thanks!


(Kenneth Endfinger) #5

This is really good! Glaforge and I were worried that this would not happen! Good thing it did :slight_smile:


What's the minimum version of Java supported by Gradle 2.7?