Skip to content

Jvm version incompatibility #8

@Emirlol

Description

@Emirlol

Description

I'm not sure if this is caused by magik directly, but I can't get this to work and I'd really like some help. I have no issues with publishing btw, it's only the usage of the jars that I've published.

I'm having a strange issue with the published jar's jvm version. I've set it to 21 literally everywhere, I don't even have jdk 23 installed on my machine, but when I try to use jar as a dependency on another project (which also uses jdk 21) I get an error from gradle telling me it's built for jdk 23 and I should find a version of that dependency built for jdk 21.

This doesn't happen with the local maven repo. I've tried uploading the files manually from the local maven and the issue still happens.
I'm using intellij, and here's the things I tried:

  • Setting the version of gradle from Build, Execution, Deployment > Build Tools > Gradle to the project sdk/21.
  • Setting the project's sdk to 21 (from the menu that opens via ctrl+alt+shift+s, I don't know its name.)
  • Setting the sourceCompatibility and targetCompatibility from gradle's java block to 21, or directly setting toolchain to 21 of adoptium
  • Setting jvmToolchain (again) from kotlin.jvmToolchain to 21 of adoptium
  • Setting the options.release of tasks.withType<JavaCompile>() to 21
  • Setting the compilerOptions.jvmTarget of tasks.withType<KotlinCompile>() to 21
  • I've even tried checking the compiled class files' version and intellij says its major version is 65 (which is jdk 21)

I have no idea what else I can do.
Here are the links, with some git history deleted:

This is using the first method mentioned in magik's readme, btw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions