Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bazel_dep(name = "protobuf", version = "31.1")
bazel_dep(name = "rules_kotlin", version = "2.1.9")
bazel_dep(name = "rules_java", version = "8.15.1")
bazel_dep(name = "rules_jvm_external", version = "6.8")
bazel_dep(name = "grpc-java", repo_name = "io_grpc_grpc_java", version = "1.71.0")
bazel_dep(name = "grpc-java", version = "1.71.0")

grpc_kotlin_maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
grpc_kotlin_maven.install(
Expand Down
3 changes: 2 additions & 1 deletion compiler/src/main/java/io/grpc/kotlin/generator/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@rules_java//java:defs.bzl", "java_binary")
load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")

licenses(["notice"])
Expand All @@ -14,7 +15,7 @@ kt_jvm_library(
"//stub/src/main/java/io/grpc/kotlin:context",
"//stub/src/main/java/io/grpc/kotlin:stub",
"@protobuf//:protobuf_java",
"@io_grpc_grpc_java//core",
"@grpc-java//core",
"@grpc_kotlin_maven//:com_google_guava_guava",
"@grpc_kotlin_maven//:com_squareup_kotlinpoet",
"@grpc_kotlin_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ kt_jvm_binary(
"//examples/protos/src/main/proto/io/grpc/examples/animals:animals_kt_grpc",
"//examples/protos/src/main/proto/io/grpc/examples/animals:animals_kt_proto",
"@protobuf//:protobuf_java_util",
"@io_grpc_grpc_java//netty",
"@grpc-java//netty",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ kt_jvm_binary(
deps = [
"//examples/protos/src/main/proto/io/grpc/examples/helloworld:hello_world_kt_grpc",
"//examples/protos/src/main/proto/io/grpc/examples/helloworld:hello_world_kt_proto",
"@io_grpc_grpc_java//netty",
"@grpc-java//netty",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ kt_jvm_binary(
"//examples/protos/src/main/proto/io/grpc/examples/routeguide:route_guide_kt_proto",
"//examples/stub/src/main/kotlin/io/grpc/examples/routeguide:route_guide_stub",
"@protobuf//:protobuf_java_util",
"@io_grpc_grpc_java//netty",
"@grpc-java//netty",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ kt_jvm_binary(
main_class = "io.grpc.examples.helloworld.HelloWorldClientKt",
deps = [
"//examples/protos/src/main/proto/io/grpc/examples/helloworld:hello_world_kt_grpc",
"@io_grpc_grpc_java//netty",
"@grpc-java//netty",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ kt_jvm_binary(
"//examples/protos/src/main/proto/io/grpc/examples/animals:animals_kt_grpc",
"//examples/protos/src/main/proto/io/grpc/examples/animals:animals_kt_proto",
"@protobuf//:protobuf_java_util",
"@io_grpc_grpc_java//netty",
"@grpc-java//netty",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ kt_jvm_binary(
deps = [
"//examples/protos/src/main/proto/io/grpc/examples/helloworld:hello_world_kt_grpc",
"//examples/protos/src/main/proto/io/grpc/examples/helloworld:hello_world_kt_proto",
"@io_grpc_grpc_java//netty",
"@grpc-java//netty",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ kt_jvm_binary(
"//examples/protos/src/main/proto/io/grpc/examples/routeguide:route_guide_kt_proto",
"//examples/stub/src/main/kotlin/io/grpc/examples/routeguide:route_guide_stub",
"@protobuf//:protobuf_java_util",
"@io_grpc_grpc_java//netty",
"@grpc-java//netty",
],
)
8 changes: 5 additions & 3 deletions kt_jvm_grpc.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
load("@rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library")
load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
load("@grpc-java//:java_grpc_library.bzl", "java_grpc_library")
load("@protobuf//bazel/common:proto_info.bzl", "ProtoInfo")
load("@protobuf//bazel:java_lite_proto_library.bzl", "java_lite_proto_library")
load("@protobuf//bazel:java_proto_library.bzl", "java_proto_library")
load("@rules_java//java:defs.bzl", "JavaInfo")

def _invoke_generator(ctx, proto_dep, output_dir):
Expand Down Expand Up @@ -364,7 +366,7 @@ def kt_jvm_proto_library(
else:
java_proto_target = ":%s_DO_NOT_DEPEND_java_proto" % name
if flavor == "lite":
native.java_lite_proto_library(
java_lite_proto_library(
name = java_proto_target[1:],
deps = deps,
testonly = testonly,
Expand All @@ -376,7 +378,7 @@ def kt_jvm_proto_library(
features = features,
)
else:
native.java_proto_library(
java_proto_library(
name = java_proto_target[1:],
deps = deps,
testonly = testonly,
Expand Down
6 changes: 3 additions & 3 deletions stub/src/main/java/io/grpc/kotlin/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ kt_jvm_library(
),
deps = [
":context",
"@io_grpc_grpc_java//core",
"@io_grpc_grpc_java//stub",
"@grpc-java//core",
"@grpc-java//stub",
"@grpc_kotlin_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core",
"@grpc_kotlin_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm",
],
Expand All @@ -25,7 +25,7 @@ kt_jvm_library(
name = "context",
srcs = ["GrpcContextElement.kt"],
deps = [
"@io_grpc_grpc_java//context",
"@grpc-java//context",
"@grpc_kotlin_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core",
"@grpc_kotlin_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm",
],
Expand Down
4 changes: 2 additions & 2 deletions stub/src/test/java/io/grpc/kotlin/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ kt_jvm_library(
srcs = [":AbstractCallsTest.kt"],
deps = [
"//stub/src/test/proto/helloworld:hello_world_kt_grpc",
"@io_grpc_grpc_java//testing",
"@grpc-java//testing",
],
)

Expand Down Expand Up @@ -53,7 +53,7 @@ kt_jvm_test(
test_class = "io.grpc.kotlin.GrpcContextElementTest",
deps = [
"//stub/src/main/java/io/grpc/kotlin:context",
"@io_grpc_grpc_java//core",
"@grpc-java//core",
"@grpc_kotlin_maven//:com_google_truth_truth",
"@grpc_kotlin_maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core",
],
Expand Down