https://kotlinlang.org logo
#grpc
Title
# grpc
j

jimn

03/18/2020, 7:24 AM
it looks like the google grpc kotlin examples are using a different plugin hierarchy from a medium article that has a "kotlin-grpc-plugin" and if i want to get an idea of the samples i should ... run a shellscript?
s

Sebastien Leclerc Lavallee

03/18/2020, 12:35 PM
There aren’t official Google implementation of gRPC for Kotlin. Everything is done in Java which is OK if you work with Android/JVM only. And to create classes out of protobuf defintions, you must use a CLI tool called
protoc
. Again, Google provide gradle plugin to do this but you can do it inside a shell script. All Kotlin implementations are third party and have different pros and cons
j

jimn

03/18/2020, 12:37 PM
if i ditch gradle, and convert to a maven project, i can start to bring in libraries, and let intellij reason about the project artifacts and versions in one project language. I can bring in grpc and start using methods and classes without gradle, i think
s

Sebastien Leclerc Lavallee

03/18/2020, 12:39 PM
I can’t help you much with maven, haven’t worked with it
j

jimn

03/18/2020, 12:40 PM
as an alternative, can you show me a sample that doesn't look like it's thrown over the wall by a team too busy with internal projects?
s

Sebastien Leclerc Lavallee

03/18/2020, 12:42 PM
From what I had found, this is the plugin with good example: https://github.com/google/protobuf-gradle-plugin
j

jimn

03/18/2020, 1:43 PM
i think this is too much magic in one place. i want the proto as a codec,, i can make determinations about rpc and protocol intelligently, these project examples don't really lend themselves well to coexisting in a project that needs to add RPC. im not enough up on gradle modules to do anything cleanly with the examples given in the context needed
6 Views