Mario Loncar

03/01/2023, 3:32 PM
Hello all, did anyone use Protobuf for KMM project? Basically, my generated Protobuf files are in
folder, I generated both Kotlin and mandatory Java file. The problem is: I see generated files in
but I cannot see generated Kotlin models in
(which makes sense since they rely on Java file), and when I add files to sourceSets, Kotlin Proto files gets corrupted and are unable to resolve mandatory proto Java file. Did anyone encounter this and how did you solve it?
you should use wire

Mario Loncar

03/01/2023, 3:39 PM
hm, yeah. I will give it a shot. Thanks! 🙂

Darron Schall

03/01/2023, 10:05 PM
I'm using for protobuf in a KMM app.

Vidmantas Kerbelis

03/02/2023, 6:54 AM
Personally, I’d recommend Wire, at least for the interoperability between Android and iOS in our project that was the best solution. My reasoning is in this thread:

Mario Loncar

03/03/2023, 10:03 AM
What I basically want to achieve is: have Proto models in data layer which will be mapped to domain models (pure data classes) and exposed to iOS in form of use cases. So on iOS side developers wouldn’t even need to use Protobuf. I have to research this in more details. Thanks for the advice!