rules_proto_grpc
rules_proto_grpc copied to clipboard
feat: Add Kotlin (JVM) support
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:
WORKSPACEordering had to be rearranged a bit -grpc_extra_depsimports its own (older) rules_kotlin which got messy.- Not sure how best to document the optional
java_<type>_targetparameter 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 thekotlindirectory, but this doesn't seem simple to do without heavily modifying the rulegen templates. Probably not a huge problem.