I recently updated my Gradle to 2.13 and it doesn’t work like the previous version that I used. In my build.gradle files, I use the following setting:
sourceCompatibility = 1.6
This is because I’m maintaining a library that should be backwards-compatible. When I was using
gradle eclipse command to generate Eclipse project, it used to set compliance level to 1.6 (as expected), and hook up my system Java 8 JRE library, thus generating no warnings.
However, the new Gradle version hooks up
JRE System Library [JavaSE-1.6], which generates the following warning:
Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment.
I know how to remove the warning manually (remove the incorrect system library, add default Java 8 system lib), but I want to know if there’s a way of achieving the previous Gradle behavior without
having to modify anything in the IDE itself.