Skip to content

Migrate client to Kotlin/JVM with Java 8 runtime compatibility - #7

Draft
gradwahl wants to merge 1 commit into
254-SDfrom
kotlin-jvm-java8
Draft

Migrate client to Kotlin/JVM with Java 8 runtime compatibility#7
gradwahl wants to merge 1 commit into
254-SDfrom
kotlin-jvm-java8

Conversation

@gradwahl

@gradwahl gradwahl commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Goal

Convert the client from Java to Kotlin/JVM while preserving compatibility with a Java 8 runtime.

First migration batch

  • Add Kotlin Maven plugin and Kotlin stdlib.
  • Compile Kotlin sources with jvmTarget = 1.8 (Java 8 class-file version 52).
  • Convert IsaacCipher, PacketBuffer, Protocol, and LoginResult to Kotlin.
  • Preserve Java-facing fields, static constants, constructors, and record-style accessors so remaining Java sources can interoperate during the migration.

Validation performed

  • Kotlin classes compile with JVM target 1.8.
  • javap reports class-file major version 52.
  • A Java interop harness compiled with --release 8 successfully accesses the migrated API.
  • 2,000 ISAAC outputs match the original Java implementation.

Important migration state

This PR is intentionally a draft. The repository is not yet fully Java 8 runnable because remaining Java files still contain Java 17-era syntax and Maven must temporarily compile those Java sources as Java 17. The final migration step will switch the Java compiler target to 8 (or remove Java compilation entirely) after the remaining .java files are converted and Java 9+ API usages are removed/replaced.

Next batches

Convert the remaining packages incrementally, prioritising Java 17-only constructs (record, switch expressions, etc.), then run a full Java 8 compatibility pass over library/API usage and packaging.

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