Is there a way to know if a library is compatibile...
# multiplatform
r
Is there a way to know if a library is compatibile with multiplatforms? For example, this repo (though it is about the output in this case): https://github.com/rouzwawi/grpc-kotlin if not, would it be possible to do?
k
The following suggests no, if it’s using java underneath
r
In the current ecosystem it's pretty unlikely that a library is multiplatform-supported if it doesn't explicitly tell you that it is.
k
Yeah. Assumed it wouldn’t work out of the box, but was thinking it might be an interesting library target if it was generating kotlin
r
Yes, the follow-up question was if it would be do-able to make it multiplatform-supported. I've never done it before, but I could give it a try.......
To me it is extra complex due to it is generating the code, and it is not the code itself I'd have to migrate 🤣
k
Well, good luck, but I definitely wouldn’t start with something like that 🍀🥃
r
Okay, maybe I'll stall it a bit if it's not that "easy" 😏
p
Actually, I think the answer to the original question might well be yes, but difficult to obtain. My KFile multiplatform library has a .module file for which a grep of “org.jetbrains.kotlin.platform.type” will reveal “jvm”, “common”, and “native”. One would need to verify the existence of the
<artifact>-<version>.module
file then grep it to test for the supported platforms. Definitely not easy and it relies on volatile internals.
👍 1
Certainly doable manually however.