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

Support bazel 7 (not bzlmod) #329

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 2 additions & 6 deletions bazel/java_reactive_grpc_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _reactive_grpc_library_impl(ctx):
args = ctx.actions.args()
args.add(ctx.executable.reactive_plugin.path, format = "--plugin=protoc-gen-reactive-grpc-plugin=%s")
args.add("--reactive-grpc-plugin_out=:{0}".format(gensrcjar.path))
args.add_joined("--descriptor_set_in", descriptor_set_in, join_with = ctx.host_configuration.host_path_separator)
args.add_joined("--descriptor_set_in", descriptor_set_in, join_with = ctx.configuration.host_path_separator)
for src in proto.check_deps_sources.to_list():
args.add(_proto_path(src, proto))

Expand All @@ -71,7 +71,6 @@ def _reactive_grpc_library_impl(ctx):
java_info = java_common.compile(
ctx,
deps = deps,
host_javabase = find_java_runtime_toolchain(ctx, ctx.attr._host_javabase),
java_toolchain = find_java_toolchain(ctx, ctx.attr._java_toolchain),
output = ctx.outputs.jar,
output_source_jar = ctx.outputs.srcjar,
Expand Down Expand Up @@ -109,17 +108,14 @@ _reactive_grpc_library = rule(
"_java_toolchain": attr.label(
default = Label("@bazel_tools//tools/jdk:current_java_toolchain"),
),
"_host_javabase": attr.label(
cfg = "host",
default = Label("@bazel_tools//tools/jdk:current_host_java_runtime"),
),
},
fragments = ["java"],
outputs = {
"jar": "lib%{name}.jar",
"srcjar": "lib%{name}-src.jar",
},
provides = [JavaInfo],
toolchains = ["@@bazel_tools//tools/jdk:toolchain_type"],
implementation = _reactive_grpc_library_impl,
)

Expand Down