Adam S

08/09/2022, 5:53 PM
I'm trying to figure out how to recreate a MockK issue that only happens with Java 17. I've got a unit test, that fails when I manually set
. It's a bit frustrating because in CI/CD it tests using JDK 11/17/18 - but they all pass because Gradle sets the tests to use the same as the main code - JDK 11. But I would like to automate this, so I don't have to manually set the version for test code. How can I set the Java language level to 11/17/18 based on a Gradle property for compile test code in
? I'm using Kotlin Multiplatform 1.7.10, Gradle 7.5.1.