Hello there. Is there a protobuf generator for Kot...
# announcements
s
Hello there. Is there a protobuf generator for Kotlin. I'm currently using the generated Java classes.
a
I’d highly recommend using https://github.com/square/wire with kotlin it generates @NotNull/Nullable with the
—android
option
s
Meh, doesn't support protobuf 3, also not sure if the "runs on Android"is useful if you are only on desktop
a
it does support protobuf3, but only in 2.3.0 RC1
what’s useful is field nullability and immutability
s
I just checked it out. It pretty much has everything that is needed for basic Proto 3 support. And since I'm using it on Android, definitely the generated code is much better over Google's implementation
s
Maybe I'll give it a shot. Shame why there's no gradle plugin
Got a sample of gradle config to run it?
t
Not sure if it works though
Hmm @jw
j
Write a JavaExec task that just runs the normal compiler via main
s
Ah you last said you were working on "first party support", sounded like something tangible
Guess that didn't pan out?
j
Haven't had the time or desire. We just use a JavaExec task
100 Views