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.
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:
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.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.kt_jvm_*
under thekotlin
directory, but this doesn't seem simple to do without heavily modifying the rulegen templates. Probably not a huge problem.