From 87437fd88d740968152e0d0dbdca2ce2f7e9aae2 Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 8 Dec 2022 01:12:22 -0800 Subject: [PATCH] Parameterize deploy jar rule to make it a test rule This is needed since the deploy jar rule will depend on the java_test rule PiperOrigin-RevId: 493824662 Change-Id: I50a4b0b74a5d9b6bdb8aa48fae7d9485e5b59e90 --- .../builtins_bzl/common/java/java_binary_deploy_jar.bzl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/starlark/builtins_bzl/common/java/java_binary_deploy_jar.bzl b/src/main/starlark/builtins_bzl/common/java/java_binary_deploy_jar.bzl index 30ff3ad7e9ec26..8ff90684698574 100644 --- a/src/main/starlark/builtins_bzl/common/java/java_binary_deploy_jar.bzl +++ b/src/main/starlark/builtins_bzl/common/java/java_binary_deploy_jar.bzl @@ -224,7 +224,7 @@ def _implicit_outputs(name): "unstrippeddeployjar": "%s_deploy.jar.unstripped" % actual_name, } -def make_deploy_jars_rule(implementation): +def make_deploy_jars_rule(implementation, test = False): """Creates the deploy jar auxiliary rule for java_binary Args: @@ -251,4 +251,5 @@ def make_deploy_jars_rule(implementation): outputs = _implicit_outputs, fragments = ["java"], toolchains = [semantics.JAVA_TOOLCHAIN, semantics.JAVA_RUNTIME_TOOLCHAIN] + cc_helper.use_cpp_toolchain(), + test = test, )