From a507e59529b747799935e633ece6f20958956dc8 Mon Sep 17 00:00:00 2001 From: hvd Date: Mon, 15 Apr 2024 09:59:24 +0200 Subject: [PATCH] Add `load()` statements for the Bazel builtin top-level java symbols Loads are being added in preparation for moving the symbols out of Bazel and into `rules_java`. --- MODULE.bazel | 1 + WORKSPACE | 8 ++++++++ java_grpc_library.bzl | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/MODULE.bazel b/MODULE.bazel index f441f7fd3e9e..a5e75d360b29 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -49,6 +49,7 @@ bazel_dep(name = "googleapis", repo_name = "com_google_googleapis", version = "0 bazel_dep(name = "grpc", repo_name = "com_github_grpc_grpc", version = "1.56.3.bcr.1") bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "23.1") bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "rules_java", version = "7.5.0") bazel_dep(name = "rules_go", repo_name = "io_bazel_rules_go", version = "0.46.0") bazel_dep(name = "rules_jvm_external", version = "6.0") bazel_dep(name = "rules_proto", version = "5.3.0-21.7") diff --git a/WORKSPACE b/WORKSPACE index b9be7bc47ae8..32d81038b860 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -2,6 +2,14 @@ workspace(name = "io_grpc_grpc_java") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +http_archive( + name = "rules_java", + urls = [ + "https://github.com/bazelbuild/rules_java/releases/download/7.5.0/rules_java-7.5.0.tar.gz", + ], + sha256 = "4da3761f6855ad916568e2bfe86213ba6d2637f56b8360538a7fb6125abf6518", +) + http_archive( name = "rules_jvm_external", sha256 = "d31e369b854322ca5098ea12c69d7175ded971435e55c18dd9dd5f29cc5249ac", diff --git a/java_grpc_library.bzl b/java_grpc_library.bzl index 22487954aeff..1b8d6a4403be 100644 --- a/java_grpc_library.bzl +++ b/java_grpc_library.bzl @@ -1,5 +1,9 @@ """Build rule for java_grpc_library.""" +load("@rules_java//java/common:java_common.bzl", "java_common") +load("@rules_java//java/common:java_info.bzl", "JavaInfo") +load("@rules_java//java/common:java_plugin_info.bzl", "JavaPluginInfo") + _JavaRpcToolchainInfo = provider( fields = [ "java_toolchain",