Skip to content

Use Java 11 for compiling and running tests #489

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

krzema12
Copy link
Owner

@krzema12 krzema12 commented Aug 2, 2025

Thanks to this, we keep providing the lib for projects that are still on Java 8, and we can use newest kotest which requires at least Java 11-equivalent bytecode.

See the discussion in #485 and https://kotlinlang.slack.com/archives/CT0G9SD7Z/p1754028241224579?thread_ts=1754028241.224579&cid=CT0G9SD7Z.

Testing

For tests, checked in #400 that running with kotest 6.0.0.M9 that requires Java 11 works fine.

To ensure that the release will still be compatible with Java 8, tested by inspecting the snapshot's JAR (I temporarily enabled publishing snapshots from this branch, see https://central.sonatype.com/repository/maven-snapshots/it/krzeminski/snakeyaml-engine-kmp-jvm/3.1.2-SNAPSHOT/snakeyaml-engine-kmp-jvm-3.1.2-20250803.193827-16.jar):

> jar xf snakeyaml-engine-kmp-jvm-3.1.2-20250803.193827-16.jar
> file it/krzeminski/snakeyaml/engine/kmp/api/YamlUnicodeReader.class
it/krzeminski/snakeyaml/engine/kmp/api/YamlUnicodeReader.class: compiled Java class data, version 52.0 (Java 1.8)

@krzema12 krzema12 marked this pull request as ready for review August 2, 2025 12:48
@krzema12 krzema12 requested review from aSemy and OptimumCode August 2, 2025 12:48
@krzema12 krzema12 changed the title Use Java 11 for running tests Use Java 11 for compiling and running tests Aug 3, 2025
@krzema12 krzema12 marked this pull request as draft August 3, 2025 17:25
@krzema12 krzema12 marked this pull request as ready for review August 3, 2025 19:48
@krzema12
Copy link
Owner Author

krzema12 commented Aug 3, 2025

@aSemy @OptimumCode please review 🙏 I think this is the ultimate solution: preserves compatibility with consumers on Java 8, and lets us use newest kotest.

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.

1 participant