kotlin-compiler-server
kotlin-compiler-server copied to clipboard
Explicitly set the JVM target
This is meant to fix #579
Hi, @sheu.
Nice fix, thank you! You're right :)
Could you please add a test please?
@sheu hi, any updates? :)
@sheu hi, any updates? :)
I had a hard time figuring out how best to test it. I will push the testcase today.
Finally added the test case but that meant that I had to change my solution to make it testable.
Hmm, maybe we can just put some code and run it? like
@Test
fun `jvm target 11 test`() {
run(
code = "fun main() {\n // put some code here \n}",
contains = "the result of the code"
)
}
@sheu hi, let's take your first version to the master?
Why do you don't set-up the jvmtoolchain using kotlin.jvmtoolchain(11)? This will fix your problems because Gradle sets the correct attributes and the jdk.