Title
s

senthilkumarv

04/18/2017, 11:33 AM
Hello there. Is there a protobuf generator for Kotlin. I'm currently using the generated Java classes.
a

adeln

04/18/2017, 2:03 PM
I’d highly recommend using https://github.com/square/wire with kotlin it generates @NotNull/Nullable with the
—android
option
s

sreich

04/18/2017, 2:45 PM
Meh, doesn't support protobuf 3, also not sure if the "runs on Android"is useful if you are only on desktop
a

adeln

04/18/2017, 2:50 PM
it does support protobuf3, but only in 2.3.0 RC1
what’s useful is field nullability and immutability
s

senthilkumarv

04/18/2017, 3:07 PM
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

sreich

04/18/2017, 4:34 PM
Maybe I'll give it a shot. Shame why there's no gradle plugin
Got a sample of gradle config to run it?
t

teedee

04/18/2017, 4:39 PM
Not sure if it works though
Hmm @jw
j

jw

04/18/2017, 4:47 PM
Write a JavaExec task that just runs the normal compiler via main
s

sreich

04/18/2017, 4:50 PM
Ah you last said you were working on "first party support", sounded like something tangible
Guess that didn't pan out?
j

jw

04/19/2017, 2:55 PM
Haven't had the time or desire. We just use a JavaExec task