With the recent change to the android_binary rule's default config (commit)
proguard_mappings_output_file is no longer written to the baseline bazel-bin and now lands in the transitioned ST-<hash> output root, so it is no longer under the directory bazel info bazel-bin reports. More generally the mapping is an output of no target: it can't be requested by label, never enters a runfiles tree, and isn't fetched under --remote_download_toplevel.
The solution is to declare proguard_mappings_output_file as implicit_outputs of the ProviderInfo, copying the D8 approach. This doesn't change where the file is written; it makes it a default output, so consumers in the top-level configuration can collect it.
diff --git a/rules/android_binary/r8.bzl b/rules/android_binary/r8.bzl
index 4c4510114..c921d6d98 100644
--- a/rules/android_binary/r8.bzl
+++ b/rules/android_binary/r8.bzl
@@ -194,6 +194,7 @@ def process_r8(ctx, validation_ctx, jvm_ctx, packaged_resources_ctx, build_info_
value = struct(
final_classes_dex_zip = final_classes_dex_zip,
dex_info = android_dex_info,
+ implicit_outputs = [proguard_mappings_output_file],
providers = [
android_dex_info,
AndroidPreDexJarInfo(pre_dex_jar = deploy_jar),
With the recent change to the
android_binaryrule's default config (commit)proguard_mappings_output_fileis no longer written to the baselinebazel-binand now lands in the transitionedST-<hash>output root, so it is no longer under the directorybazel info bazel-binreports. More generally the mapping is an output of no target: it can't be requested by label, never enters a runfiles tree, and isn't fetched under--remote_download_toplevel.The solution is to declare
proguard_mappings_output_fileasimplicit_outputsof theProviderInfo, copying the D8 approach. This doesn't change where the file is written; it makes it a default output, so consumers in the top-level configuration can collect it.