GitHub - grpc/grpc-kotlin: Kotlin gRPC implementation. HTTP/2 based RPC (original) (raw)
gRPC-Kotlin/JVM - An RPC library and framework
Overview
A Kotlin/JVM implementation of gRPC: A high performance, open source, general RPC framework that puts mobile and HTTP/2 first.
This repo includes the sources for the following:
- protoc-gen-grpc-kotlin: A protoc plugin for generating Kotlin gRPC client-stub and server plumbing code.
Note: The Kotlin protoc plugin uses the Java protoc pluginbehind the scenes to generate message types as Java classes. Generation of Kotlin sources for proto messages is being discussed inprotocolbuffers/protobuf#3742.
- grpc-kotlin-stub: A Kotlin implementation of gRPC, providing runtime support for client-stubs and server-side code.
For more information, see the following Kotlin/JVM pages from grpc.io:
How-to pages from this repo:
Note that official releases are published to Maven Central.
Developer
Bazel 8+
Add the following to your MODULE.bazel with a suitable version.
bazel_dep(name = "grpc_kotlin", version = "VERSION")
Bazel 7
In addition to bazel_dep, create a patch to remove ignore_directories from REPO.bazel (check content of the correct version) and apply it using:
bazel_dep(name = "grpc_kotlin", version = "VERSION")
single_version_override( module_name = "grpc_kotlin", version = "VERSION", patches = [":remove_ignore_directories.patch"], patch_strip = 1, )
An example of remove_ignore_directories.patch:
--- a/REPO.bazel +++ b/REPO.bazel @@ -1 +0,0 @@ -ignore_directories(["**/bin"])
Breaking changes
bazel_dep(name = "grpc_kotlin", version = "0.0.0")
git_override( module_name = "grpc_kotlin", # For example: COMMIT=d37ed39b813107c54a0a9dbfdbfda81ccb8e4efb commit = "COMMIT", remote = "https://github.com/grpc/grpc-kotlin.git", )
Legacy WORKSPACE
No longer supported.
Maintainer
Test
Please note that the max version of JAVA supported is 22. If you use a newer version, first set your PATH:
$ PATH="$YOUR_JDK_PATH/bin:$PATH"
Then run the following command to test your local changes before committing:
$ bazelisk clean && ./gradlew clean build --parallel && ./gradlew publishToMavenLocal && bazelisk test ... && cd bzl-examples/bzlmod && bazelisk clean && bazelisk test ... && cd -
Release: Sonatype
Make sure that Release Github Action succeeds and artifacts are uploaded to Maven.
If not, contact lowasser@.
Publish to BCR
Publishing to BCR requires manual operation on the PR and hence can't be fully automated in release.yaml:
- Run the Publish to BCR Github Action: publish.yaml.
- Check logs for link to the PR.
- Manually comment
@bazel-io skip_check unstable_urland@bazel-io skip_check incompatible_flagson the generated PR.
After the PR is merged, make sure the new version is visible in BCR.