Simplify `proto_support.bzl` This is change 8/N of dismantling `@compatibility_proxy` (ignore-relnotes) PiperOrigin-RevId: 1033343351 Change-Id: Ia09c633be201b1faadad7c6008d7841ab5dfee0d
diff --git a/java/private/BUILD b/java/private/BUILD index 244de29..b2663d5 100644 --- a/java/private/BUILD +++ b/java/private/BUILD
@@ -68,7 +68,7 @@ name = "proto_support", srcs = ["proto_support.bzl"], visibility = ["//visibility:public"], - deps = ["@compatibility_proxy//:proxy_bzl"], + deps = [":internals"], ) # Exposed for use by the android rules.
diff --git a/java/private/proto_support.bzl b/java/private/proto_support.bzl index 957dc31..2295557 100644 --- a/java/private/proto_support.bzl +++ b/java/private/proto_support.bzl
@@ -13,25 +13,10 @@ # limitations under the License. """Support for Java compilation of protocol buffer generated code.""" -load("@compatibility_proxy//:proxy.bzl", "java_common", "java_common_internal_compile", "java_info_internal_merge") +load(":java_common_internal.bzl", _compile = "compile") +load(":java_info.bzl", _merge = "merge") -def compile(*, injecting_rule_kind, enable_jspecify, include_compilation_info, **kwargs): - if java_common_internal_compile: - return java_common_internal_compile( - injecting_rule_kind = injecting_rule_kind, - enable_jspecify = enable_jspecify, - include_compilation_info = include_compilation_info, - **kwargs - ) - else: - return java_common.compile(**kwargs) +# copybara: proto_support visibility -def merge(providers, *, merge_java_outputs = True, merge_source_jars = True): - if java_info_internal_merge: - return java_info_internal_merge( - providers, - merge_java_outputs = merge_java_outputs, - merge_source_jars = merge_source_jars, - ) - else: - return java_common.merge(providers) +compile = _compile +merge = _merge