rules_proto_grpc icon indicating copy to clipboard operation
rules_proto_grpc copied to clipboard

feat: Add Kotlin (JVM) support

Open Zetten opened this issue 2 years ago • 0 comments

Provide rules to build Kotlin proto and grpc libraries. Currently upstream Protobuf and gRPC support only JVM-flavour Kotlin.

Fixes #139.

A few notes on implementation:

  • Mostly simple, largely copied from the Java implementation.
  • An updated routeguide example was adapted from https://github.com/grpc/grpc-kotlin - with renamed packages to avoid class collision with the Java example.

Some points which may want attention before merging:

  • WORKSPACE ordering had to be rearranged a bit - grpc_extra_deps imports its own (older) rules_kotlin which got messy.
  • Not sure how best to document the optional java_<type>_target parameter on the macro - the Kotlin rules depend on the compiled Java library for the same proto, but users may want to build them separately for some reason.
  • Naming would ideally be kt_jvm_* under the kotlin directory, but this doesn't seem simple to do without heavily modifying the rulegen templates. Probably not a huge problem.

Zetten avatar Feb 17 '23 09:02 Zetten