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

Kotlin Multiplatform #1123

Open
StefanOltmann opened this issue Jan 21, 2024 · 11 comments
Open

Kotlin Multiplatform #1123

StefanOltmann opened this issue Jan 21, 2024 · 11 comments

Comments

@StefanOltmann
Copy link

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.

@eustas
Copy link
Collaborator

eustas commented Jan 21, 2024

Will do, alongside with coming v1.1.1 release.

@slandelle
Copy link

slandelle commented 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.

@eustas
Copy link
Collaborator

eustas commented Jan 21, 2024

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

@eustas
Copy link
Collaborator

eustas commented Jan 21, 2024

@slandelle correct, not a replacement, of course.

@YohanSciubukgian
Copy link

Could it be supported on JAVA 8+ ?

@StefanOltmann
Copy link
Author

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

@YohanSciubukgian
Copy link

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! 🙂

@eustas
Copy link
Collaborator

eustas commented Feb 22, 2024

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

@StefanOltmann
Copy link
Author

@StefanOltmann
Copy link
Author

StefanOltmann commented Feb 22, 2024

@eustas The Java dependencies prevent it from being multiplatform.

import java.io.IOException
import java.io.InputStream

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.

@umesh0492
Copy link

Hello, any updates here ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants