https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

Robert

12/14/2018, 8:37 PM
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

kpgalligan

12/14/2018, 8:43 PM
The following suggests no, if it’s using java underneath
r

russhwolf

12/14/2018, 9:03 PM
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

kpgalligan

12/14/2018, 9:05 PM
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

Robert

12/14/2018, 9:43 PM
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

kpgalligan

12/14/2018, 9:46 PM
Well, good luck, but I definitely wouldn’t start with something like that 🍀🥃
r

Robert

12/14/2018, 10:11 PM
Okay, maybe I'll stall it a bit if it's not that "easy" 😏
p

pajatopmr

12/15/2018, 7:37 AM
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.
2 Views