Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Kotlin (JVM) support #250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Zetten
Copy link

@Zetten Zetten commented Feb 17, 2023

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.

@github-actions github-actions bot added dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation lang-java Java rules specific labels Feb 17, 2023
@aaliddell aaliddell mentioned this pull request Mar 5, 2023
Provide rules to build Kotlin proto and grpc libraries. Currently
upstream Protobuf and gRPC support only JVM-flavour Kotlin.

Fixes rules-proto-grpc#139.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation lang-java Java rules specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kotlin-JVM support (protobuf >=3.17.0)
1 participant