I’ve always multiple Jdk versions on my machine. So usually when I start gradle it would use the newest one available on my machine. But some projects I have to build are 1.5 or 1.6 projects.
Is there a way to tell gradle which specific jdk is to be used to compile a certain project, so the source-, target- and classpath compatibility would be correct set?
Using sourceCompatibility, targetCompatibility properties seems to be not enough because the source and target compatibliliy from the class file point of view is ok but I get always new classes (from jdk7) referenced by accident which break compatibility. Especially when I use gradle eclipse plugin which links with the new class lib (jdk7) so I get new code completion proposals.
So i thought org.gradle.java.home property would fix it. But than I get the following warning issued by the compiler:
It is recommended that the compiler be upgraded. warning: java\sql\DriverManager.class(java\sql:DriverManager.class): major version 51 is newer than 50, the highest major version supported by this compiler.
Actually I think I need to be able to set the -bootclasspath compiler option somehow. Thanks, david