Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: ProguardMapping is not queryable nor deterministically generated #194

Open
EdbertChan opened this issue Jan 12, 2024 · 1 comment
Open

Comments

@EdbertChan
Copy link

There is a bug in rules_android where the proguard_mapping file may not be reproduced. The root cause is that the proguard mapping file is not being explicitly declared as the output of the implicit target.

Reproduction steps:

  1. Build a Bazel binary that enables proguard mapping, enables disk, and remote cache
  2. Run bazel clean --expunge
  3. Rebuild the Bazel binary.
  4. Observe the proguard mapping is not found at bazel-out/xplat-fastbuild/bin//_RESOURCES_DO_NOT_USE_proguard.map

Furthermore, there is no way to actually query this file. This is problematic because we will need to upload the obfuscated mapping when debugging/deobfuscating builds.

bazel cquery //:_RESOURCES_DO_NOT_USE --output files

@ahumesky
Copy link
Collaborator

ahumesky commented Jan 12, 2024

is proguard_generate_mapping enabled on the android_binary? https://bazel.build/reference/be/android#android_binary.proguard_generate_mapping

the proguard mapping file should be an implicit output of the binary, available as targetname_proguard.map

https://bazel.build/reference/be/android#android_binary_implicit_outputs

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

No branches or pull requests

2 participants