https://kotlinlang.org logo
Title
r

rrva

05/18/2020, 10:03 AM
is there a good way to enforce a certain jdk version for building a gradle project?
n

no

05/18/2020, 2:56 PM
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

rrva

05/18/2020, 4:35 PM
i’d like to require 11+ or even easier lock it down further
n

no

05/18/2020, 8:05 PM
what are you trying to lock down? out of curiousity?
r

rrva

05/19/2020, 3:55 PM
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

no

05/19/2020, 5:11 PM
the sample i sent should be exactly what you need!