Enable path mapping for `java_single_jar`. PiperOrigin-RevId: 976671582 Change-Id: Iea495cd4e2302010aaf0b5943c05b3ab527792f9
diff --git a/java/common/rules/java_single_jar.bzl b/java/common/rules/java_single_jar.bzl index 54e9f28..e36c1b7 100644 --- a/java/common/rules/java_single_jar.bzl +++ b/java/common/rules/java_single_jar.bzl
@@ -94,6 +94,9 @@ progress_message = "Merging into %s" % ctx.outputs.output.short_path, mnemonic = "JavaSingleJar", executable = ctx.executable._singlejar, + execution_requirements = { + "supports-path-mapping": "1", + }, use_default_shell_env = True, )
diff --git a/test/java/common/rules/java_single_jar_tests.bzl b/test/java/common/rules/java_single_jar_tests.bzl index bc08520..c2237e7 100644 --- a/test/java/common/rules/java_single_jar_tests.bzl +++ b/test/java/common/rules/java_single_jar_tests.bzl
@@ -52,8 +52,7 @@ if output_path_mode == "off": return "{bindir}" elif output_path_mode == "strip": - # TODO(b/554023226): use "{cfg_stripped_bindir}" once java_single_jar opts into path stripping - return "{bindir}" + return "{cfg_stripped_bindir}" fail("unexpected output path mode: " + output_path_mode) def _test_java_single_jar_basic(name):