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

Target JVM 8 instead of JVM 11 for wider support #406

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

shorinami
Copy link
Contributor

As there is actually no expense involved from developers to support JVM 8 in Kotlin, it sounds reasonable to do so, as that is still a supported and widely used java version.

The only change necessary in this case is to change the jvmTarget kotlin option.

We should not change the java toolchain version, as some test dependencies require java 11 or higher. It does not affect the target version against which we compile anyway. For same reason there is no need to touch the git actions configuration.

@shorinami shorinami mentioned this pull request Mar 11, 2024
@sksamuel sksamuel merged commit 048465e into sksamuel:master Mar 11, 2024
1 check passed
@sksamuel
Copy link
Owner

Try the latest auto generated snapshot once it completes and if good I'll do a proper release.

@shorinami
Copy link
Contributor Author

shorinami commented Mar 11, 2024

Try the latest auto generated snapshot once it completes and if good I'll do a proper release.

It does compile it for Java 8, although Gradle is still marking it as for Java 11 for whatever reason, so we should explicitly tell gradle what it is for:

   tasks.compileJava {
      targetCompatibility = "1.8"
      sourceCompatibility = "1.8"
   }

That fixes the problem, tested with local maven repository

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.

None yet

2 participants