kotlin-retry
kotlin-retry copied to clipboard
Kotlin multiplatform support?
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 ?
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 Would you be open to accepting a KMP build PR for v1 of this library?
@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.
This library is awesome and I'd also love to see KMP support especially for Linux Native. :)
Done in https://github.com/michaelbull/kotlin-retry/releases/tag/2.0.0