Kotlin Multiplatform #492

Open
opened 2026-01-29 20:44:47 +00:00 by claunia · 12 comments
Owner

Originally created by @StefanOltmann on GitHub (Jan 21, 2024).

I want to request official Kotlin Multiplatform support.

To achieve this, the Java implementation could be transformed into Kotlin and subsequently published as outlined in the guidelines provided at https://kotlinlang.org/docs/multiplatform-publish-lib.html#host-requirements. This approach ensures continued usability for pure Java projects.

Additionally, it's worth noting that the artifact on Maven Central appears to be outdated. Incorporating the process of pushing new artifacts to Maven Central into the build workflow would be a valuable improvement. This issue can also be addressed in this endeavor.

Originally created by @StefanOltmann on GitHub (Jan 21, 2024). I want to request official Kotlin Multiplatform support. To achieve this, the Java implementation could be transformed into Kotlin and subsequently published as outlined in the guidelines provided at https://kotlinlang.org/docs/multiplatform-publish-lib.html#host-requirements. This approach ensures continued usability for pure Java projects. Additionally, it's worth noting that the artifact on Maven Central appears to be outdated. Incorporating the process of pushing new artifacts to Maven Central into the build workflow would be a valuable improvement. This issue can also be addressed in this endeavor.
claunia added the release-v1.1.1 label 2026-01-29 20:44:47 +00:00
Author
Owner

@eustas commented on GitHub (Jan 21, 2024):

Will do, alongside with coming v1.1.1 release.

@eustas commented on GitHub (Jan 21, 2024): Will do, alongside with coming v1.1.1 release.
Author
Owner

@slandelle commented on GitHub (Jan 21, 2024):

Hi

To achieve this, the Java implementation could be transformed into Kotlin

Not sure what is meant exactly here.
Some non Kotlin developers won't want to add a dependency to the kotlin-stdlib (extra dependency, extra luggage). IMO, if there was to be a pure Kotlin implementation, it should be a new one that would live alongside the Java one, not a replacement.

@slandelle commented on GitHub (Jan 21, 2024): Hi > To achieve this, the Java implementation could be transformed into Kotlin Not sure what is meant exactly here. Some non Kotlin developers won't want to add a dependency to the kotlin-stdlib (extra dependency, extra luggage). IMO, if there was to be a pure Kotlin implementation, it should be a new one that would live alongside the Java one, not a replacement.
Author
Owner

@eustas commented on GitHub (Jan 21, 2024):

I see no problems having both Java and Kotlin (once Kotlin version could be transpiled from Java one).

@eustas commented on GitHub (Jan 21, 2024): I see no problems having both Java and Kotlin (once Kotlin version could be transpiled from Java one).
Author
Owner

@eustas commented on GitHub (Jan 21, 2024):

@slandelle correct, not a replacement, of course.

@eustas commented on GitHub (Jan 21, 2024): @slandelle correct, not a replacement, of course.
Author
Owner

@YohanSciubukgian commented on GitHub (Jan 29, 2024):

Could it be supported on JAVA 8+ ?

@YohanSciubukgian commented on GitHub (Jan 29, 2024): Could it be supported on JAVA 8+ ?
Author
Owner

@StefanOltmann commented on GitHub (Jan 29, 2024):

Could it be supported on JAVA 8+ ?

I am not sure what you are asking.

Kotlin produces by default Java 8 bytecode and a Kotlin port should just work.

https://kotlinlang.org/docs/faq.html#which-versions-of-jvm-does-kotlin-target

@StefanOltmann commented on GitHub (Jan 29, 2024): > Could it be supported on JAVA 8+ ? I am not sure what you are asking. Kotlin produces by default Java 8 bytecode and a Kotlin port should just work. https://kotlinlang.org/docs/faq.html#which-versions-of-jvm-does-kotlin-target
Author
Owner

@YohanSciubukgian commented on GitHub (Jan 29, 2024):

As I have a JAVA 8 project, I was wondering if this could work for my project. I guess the bytecode interoperability should do the job. Thanks for your answer! 🙂

@YohanSciubukgian commented on GitHub (Jan 29, 2024): As I have a JAVA 8 project, I was wondering if this could work for my project. I guess the bytecode interoperability should do the job. Thanks for your answer! 🙂
Author
Owner

@eustas commented on GitHub (Feb 22, 2024):

Added kotlin implementation of decoder. Looking at requirements for publishing.

@eustas commented on GitHub (Feb 22, 2024): Added kotlin implementation of decoder. Looking at requirements for publishing.
Author
Owner

@StefanOltmann commented on GitHub (Feb 22, 2024):

Great news!

There is a official tutorial:
https://kotlinlang.org/docs/multiplatform-publish-lib.html#disable-sources-publication

Look at my project for a sample config:
80028c814d/build.gradle.kts (L460-L513)

@StefanOltmann commented on GitHub (Feb 22, 2024): Great news! There is a official tutorial: https://kotlinlang.org/docs/multiplatform-publish-lib.html#disable-sources-publication Look at my project for a sample config: https://github.com/Ashampoo/kim/blob/80028c814de583737f3a95599745d12ca5051df8/build.gradle.kts#L460-L513
Author
Owner

@StefanOltmann commented on GitHub (Feb 22, 2024):

@eustas The Java dependencies prevent it from being multiplatform.

ccec9628e4/java/org/brotli/dec/kt/BrotliInputStream.kt (L9-L10)

If those two classes represent everything that is used from Java API, you could replace it using https://github.com/Kotlin/kotlinx-io

Kotlin Multiplatform support is way more useful than just Kotlin for JVM.

On JVM we can already use the Java version, but we need a pure Kotlin implementation for Multiplatform support. So no usage of JVM api.

@StefanOltmann commented on GitHub (Feb 22, 2024): @eustas The Java dependencies prevent it from being multiplatform. https://github.com/google/brotli/blob/ccec9628e49208173c9a8829ff66d0d7f6ceff5f/java/org/brotli/dec/kt/BrotliInputStream.kt#L9-L10 If those two classes represent everything that is used from Java API, you could replace it using https://github.com/Kotlin/kotlinx-io Kotlin Multiplatform support is way more useful than just Kotlin for JVM. On JVM we can already use the Java version, but we need a **pure** Kotlin implementation for Multiplatform support. So no usage of JVM api.
Author
Owner

@umesh0492 commented on GitHub (Apr 18, 2024):

Hello, any updates here ?

@umesh0492 commented on GitHub (Apr 18, 2024): Hello, any updates here ?
Author
Owner

@xephosbot commented on GitHub (Feb 12, 2025):

Hey, are there any updates?

@xephosbot commented on GitHub (Feb 12, 2025): Hey, are there any updates?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#492