https://kotlinlang.org logo
#getting-started
Title
# getting-started
a

Alexandre Marcondes

06/29/2020, 5:29 PM
Is there any Protobuf libraries that create kotlin data classes directly from the .proto files?
d

Dariusz Kuc

06/29/2020, 5:36 PM
afaik official work to support Kotlin natively is WIP
a

Alexandre Marcondes

06/29/2020, 5:37 PM
Interesting, thanks
d

Dariusz Kuc

06/29/2020, 5:38 PM
you could use https://github.com/marcoferrer/kroto-plus to generate kotlin style builders
*but in the end it will rely on models generated for Java
for completeness official grpc lib -> https://github.com/grpc/grpc-kotlin
(you can use
kroto+
models with
grpc-kotlin
)
a

Alexandre Marcondes

06/29/2020, 5:46 PM
Right now I have data classes that translate the proto models from java taking only the data need and aggregates different models in one. But it would be much easier to use kotlin data objects directly
But thanks
78 Views