kotlin-retry icon indicating copy to clipboard operation
kotlin-retry copied to clipboard

Kotlin multiplatform support?

Open sureshg opened this issue 2 years ago • 4 comments

I am using this library with ktor on JVM and really liking it. Thanks for all the work done on this library. Are there any plans to support other kotlin targets, especially web and native ?

sureshg avatar Jul 25 '23 18:07 sureshg

Hi, thanks for your question. I have been pondering on a v2 of the library for a while, as I have some subtle breaking changes that would result in better performance & API. Given the success of the multi-platform support in kotlin-result I could also incorporate MPP as a goal of such a rewrite. It is worth mentioning that the MPP targets in this library, unlike my result library, are limited to whatever kotlinx-coroutines targets.

michaelbull avatar Jul 26 '23 15:07 michaelbull

@michaelbull Would you be open to accepting a KMP build PR for v1 of this library?

quad avatar Sep 12 '23 06:09 quad

@quad I appreciate your interest however if I have time spare to dedicate to reviewing a PR, I would probably have time to implement the changes I have in mind and cut over to KMP in the process.

If it's blocking you from using it in an multi-platform project, my best advice would be to simply copy/paste my codebase into your existing multi-platform project - it doesn't use any platform dependent code so theoretically it could just be dropped in. The only thing stopping it from being multi-platform currently is that the build system does not publish MPP artifacts.

michaelbull avatar Sep 13 '23 22:09 michaelbull

This library is awesome and I'd also love to see KMP support especially for Linux Native. :)

jamesward avatar Dec 21 '23 18:12 jamesward

Done in https://github.com/michaelbull/kotlin-retry/releases/tag/2.0.0

michaelbull avatar Mar 03 '24 23:03 michaelbull