is there a good way to enforce a certain jdk versi...
# gradle
r
is there a good way to enforce a certain jdk version for building a gradle project?
n
Thanks for the shout out 🙂 That will ensure that your java home is the same, but if you want to ensure that all your builds use java8 you can try this: https://github.com/gradle/android-cache-fix-gradle-plugin/blob/master/build.gradle#L121
@Arun do you use the gradle doctor in your build? 😄
r
i’d like to require 11+ or even easier lock it down further
n
what are you trying to lock down? out of curiousity?
r
we import
jdk.jfr
package in our code which is only part of JDK 11+
and this is not possible to express as a gradle dependency afaik, but its a dependency on JDK internal classes
so I want to ensure people are guided in the right direction when building. It’s in the README but still
n
the sample i sent should be exactly what you need!