Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly set the JVM target #594

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sheu
Copy link

@sheu sheu commented Jan 9, 2023

No description provided.

@sheu
Copy link
Author

sheu commented Jan 9, 2023

This is meant to fix #579

@AlexanderPrendota
Copy link
Collaborator

Hi, @sheu.

Nice fix, thank you! You're right :)

Could you please add a test please?

@AlexanderPrendota
Copy link
Collaborator

@sheu hi, any updates? :)

@sheu
Copy link
Author

sheu commented Feb 7, 2023

@sheu hi, any updates? :)

I had a hard time figuring out how best to test it. I will push the testcase today.

@sheu sheu force-pushed the fix/set-jvm-target branch 2 times, most recently from d6bc1ca to c41e10d Compare February 7, 2023 14:37
@sheu sheu force-pushed the fix/set-jvm-target branch from c41e10d to 1d29913 Compare February 7, 2023 14:39
@sheu
Copy link
Author

sheu commented Feb 7, 2023

Finally added the test case but that meant that I had to change my solution to make it testable.

@AlexanderPrendota
Copy link
Collaborator

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"
    )
  }

@AlexanderPrendota
Copy link
Collaborator

@sheu hi, let's take your first version to the master?

@hfhbd
Copy link
Contributor

hfhbd commented Mar 20, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants