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 plugin behind the scenes to generate message types as Java classes. Generation of Kotlin sources for proto messages is being discussed in protocolbuffers/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.
Add the following to your MODULE.bazel
with a suitable version.
bazel_dep(name = "grpc_kotlin", version = "VERSION")
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(["bzl-examples", "formatter", "**/bin"])
No longer supported.
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 -
Make sure that Release Github Action succeeds and artifacts are uploaded to Maven.
If not, contact @bshaffer.
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_url
on the generated PR.
After the PR is merged, make sure the new version is visible in BCR.