Hi! I am confused about how to set JVM target to 1...
# compiler
g
Hi! I am confused about how to set JVM target to 17th version in compiler test framework instead of default 8th. I see that I can change
targetPlatform
in
globalDefaults { ... }
to
JvmPlatforms.jvm17
instead of
JvmPlatforms.defaultJvmPlatform
, but it seems like it does not change anything. Also, I see
JvmEnvironmentConfigurationDirectives.JDK_KIND with TestJdkKind.FULL_JDK_17
directive, but it requires to set a system property
JDK_17_0
to a JDK location and after that box tests still fail to use 17th version instead of 8th. What am I missing? What is the preferable way to solve the issue? (I'll leave my configuration links in the thread.)
d
If you want to run all tests with JDK 17, you can just set it as a runtime JDK for the test task using toolchains in gradle configuration. Otherwise the
JDK_KIND
is a recommended way. But note that using
JDK_KIND: FULL_JDK_17
will force box tests to start a separate JVM instance to test the
box()
itself.
that box tests still fail to use 17th version instead of 8th
That's strange. You can stop with debugger here and inspect what's going on.