I have a multiplatform project that compiles into JVM, IOS, JS and Android, There is one function in commonMain that is using a multiplatform library krypto, It works great on all platforms but on android there is an issue, I’d like to implement a specific implementation of this function for android source sets but for all other platforms I’d like to keep the one from commonMain, how can I do that?
I’ve looked into expect/actual but there I need to define an interface and then add implementations for every other platform, but In my case I only want to “override” so to speak the android implementation, and for all other platforms implementation from commonMain works great so I’d like to keep that.
l
Lucas
06/08/2022, 1:14 AM
Not sure if it would work, but removing the library from the common source set and only importing it in desktop/ios/js, and then providing the android implementation yourself
Probably you would have to declare the expect implementations aswell, dont know how that part would work
Lucas
06/08/2022, 1:24 AM
Actually i dont think you would need to provide the