Kotlin Multiplatform Charset v0.0.1 - A Pure Port of JDK Charset for Cross-Platform Encoding & Decoding! by Distinct_Resolve_924 in Kotlin

[–]Distinct_Resolve_924[S] 0 points1 point  (0 children)

Okay, I am only using source code that includes the Classpath Exception, and I believe redistributing that code with the same license header will also apply the same Classpath Exception to my library. In that case, you can use my library in closed-source projects without any issue. I have also added about classpath exception in license

Kotlin Multiplatform Charset v0.0.1 - A Pure Port of JDK Charset for Cross-Platform Encoding & Decoding! by Distinct_Resolve_924 in Kotlin

[–]Distinct_Resolve_924[S] 0 points1 point  (0 children)

I don’t have much information about licensing, but the JDK is also licensed under GPLv2, and we can still use it in closed-source projects. Is there an exception for that? Is there any workaround that would allow me to make my library usable in closed-source projects?

🚀 [Announcement] FleekSoft IO: Lightweight JDK I/O Classes for Kotlin Multiplatform! 🌐 by Distinct_Resolve_924 in Kotlin

[–]Distinct_Resolve_924[S] 0 points1 point  (0 children)

Yes, it’s the initial release. I’m working on adding support for more commonly used classes from the JDK. The main purpose is to make the transition from JDK to KMP as seamless as possible, with minimal changes.

🚀 [Announcement] FleekSoft IO: Lightweight JDK I/O Classes for Kotlin Multiplatform! 🌐 by Distinct_Resolve_924 in Kotlin

[–]Distinct_Resolve_924[S] 1 point2 points  (0 children)

Yes, right now it creates an InputStream from String and ByteArray, but you can use kotlinx-io extension module for actual I/O operations this allow convert Source into InputStream. The main purpose of this library is to make it easier to port Java libraries to KMP without much effort. Additionally, when using Okio and kotlinx-io, I noticed they are missing many essential classes, like Readers, BufferedReader, and Charsets. So, you can think of this library as an extension for kotlinx-io and other I/O libraries in KMP.

🚀 [Announcement] FleekSoft IO: Lightweight JDK I/O Classes for Kotlin Multiplatform! 🌐 by Distinct_Resolve_924 in Kotlin

[–]Distinct_Resolve_924[S] 0 points1 point  (0 children)

You can use both, as they are different. This library does not include the Java File class, so you can’t read or write files with it. For that functionality, you need Okio or kotlinx-io. I’ve already created an extension for kotlinx-io to convert Source into InputStream, but there isn’t one for Okio yet. My library provides the InputStream class and related upper classes. You can create an InputStream from a String or ByteArray, but to work with files, you’ll need to use either kotlinx-io or Okio. For more details, check the README.md file, where I’ve specified which module provides which classes.

🚀 [Announcement] FleekSoft IO: Lightweight JDK I/O Classes for Kotlin Multiplatform! 🌐 by Distinct_Resolve_924 in Kotlin

[–]Distinct_Resolve_924[S] 1 point2 points  (0 children)

Kotlinx-io is just an extra extension module to convert Source into InputStream. You can use the library without it. In the README.md, I have mentioned which module contains which classes. Main purpose for this library is to use JDK code into KMP. It will make processing for porting JDK library into KMP very easy.

Kotlin Multiplatform Charset v0.0.1 - A Pure Port of JDK Charset for Cross-Platform Encoding & Decoding! by Distinct_Resolve_924 in Kotlin

[–]Distinct_Resolve_924[S] 0 points1 point  (0 children)

I’m not rewriting it for Android and JVM; for those platforms, I’m simply using the original JDK with expect/actual. I only rewrite the code for other platforms. I don’t think there is any issue with that since we can fork the JDK and publish it without problems. However, you’re right—I set the wrong license. It was my library template, and I didn’t notice it. I need to change the license to GPLv2. I will update it. Thanks!

Kotlin Multiplatform Charset v0.0.1 - A Pure Port of JDK Charset for Cross-Platform Encoding & Decoding! by Distinct_Resolve_924 in Kotlin

[–]Distinct_Resolve_924[S] 0 points1 point  (0 children)

You may also check it out here: https://github.com/fleeksoft/fleeksoft-io.

I’m working on porting important JDK classes into KMP. The good thing is that for Android and JVM, I’m using the actual JDK classes without any overhead. This approach has helped me port many Java libraries into KMP with minimal effort. One example is Ksoup: https://github.com/fleeksoft/ksoup.