Skip to content

Return ProguardMappingInfo from the Starlark R8 path - #565

Closed
erikackermann wants to merge 1 commit into
bazelbuild:mainfrom
erikackermann:return-proguard-mapping-info-from-r8
Closed

erikackermann wants to merge 1 commit into
bazelbuild:mainfrom
erikackermann:return-proguard-mapping-info-from-r8

Conversation

@erikackermann

Copy link
Copy Markdown
Contributor

Summary

The Starlark R8 processor writes a proguard mapping file via --pg-map-output, but process_r8 never returned ProguardMappingInfo. android_application reads that provider from base_module to embed the mapping in AAB BUNDLE-METADATA for Play Console deobfuscation, so AAB builds using the R8 path shipped without the mapping.

Return ProguardMappingInfo(proguard_mapping = proguard_mappings_output_file) from the R8 providers list, matching the legacy postprocessing path in android_binary/impl.bzl.

Test plan

  • Build an android_application target with R8 enabled and confirm ProguardMappingInfo is present on the base module
  • Confirm the mapping is embedded in the unsigned AAB under BUNDLE-METADATA/com.android.tools.build.obfuscation/proguard.map

@alloveras

alloveras commented Oct 1, 2026 •

Copy link
Copy Markdown

I think this PR is an exact duplicate of #463 which seems to have hit merge conflicts due to staleness. I found these two PRs while I was looking around for an existing issue I could link to before raising yet another PR to incorporate this exact feature 😬

In this PR, we have an unhappy CI but a happy GitHub mergeability check, and in the other one, we have a happy CI but an unhappy GitHub mergeability check.

I am willing to do any work to land the feature, as we currently maintain a patch of our own for this, and it seems like the same feature will also be appreciated by others. However, I am seeking guidance on how best to proceed (that is, fixing CI on this PR or fixing the merge conflicts on the other PR).

The R8 processor already writes a proguard mapping file via
--pg-map-output, but process_r8 never returned ProguardMappingInfo.
android_application reads that provider from base_module to embed the
mapping in AAB BUNDLE-METADATA for Play Console deobfuscation.
@erikackermann
erikackermann force-pushed the return-proguard-mapping-info-from-r8 branch from bb482a8 to fcbfe0b Compare October 2, 2026 12:37
@erikackermann

Copy link
Copy Markdown
Contributor Author

good catch, same two-line fix as #463.

rebased onto current main and pushed. the red CI on the old run was from a stale branch (presubmit still had the separate Tools jobs that #567 removed), not from this change. Buildkite #4885 is green now.

either PR works for us; happy to close this one if you or maintainers prefer refreshing #463 instead.

@alloveras

alloveras commented Oct 5, 2026 •

Copy link
Copy Markdown

either PR works for us; happy to close this one if you or maintainers prefer refreshing #463 instead.

I have no preference, and I am not a maintainer. I just happened to hit the same issue this PR and #463 solve. So, I was trying to get a bit of momentum to get either of them merged 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants