Skip to content

Commit

Permalink
Remove output proguard pbmap and add test case for generate_mapping
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 557277925
Change-Id: I274866c4b810ba119ae5cce2f6708b63137e4f9a
  • Loading branch information
timpeut authored and copybara-github committed Aug 15, 2023
1 parent 5615075 commit a764568
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion rules/android_binary_internal/impl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ def _process_optimize(ctx, deploy_ctx, packaged_resources_ctx, **_unused_ctxs):
input_jar = deploy_ctx.deploy_jar,
output_jar = proguard_output.output_jar,
mapping = proguard_output.mapping,
proto_mapping = proguard_output.proto_mapping,
seeds = proguard_output.seeds,
usage = proguard_output.usage,
library_jar = proguard_output.library_jar,
Expand Down
16 changes: 0 additions & 16 deletions rules/proguard.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ def _optimization_action(
proguard_specs,
proguard_mapping = None,
proguard_output_map = None,
proguard_output_proto_map = None,
proguard_seeds = None,
proguard_usage = None,
proguard_config_output = None,
Expand Down Expand Up @@ -222,8 +221,6 @@ def _optimization_action(
generated by proguard_generate_mapping to be re-used to apply the same map to a new build.
proguard_output_map: File. Optional file to be used to write the output map of obfuscated
class and member names.
proguard_output_proto_map: File. Optional file used to write a proto version of the output
map.
proguard_seeds: File. Optional file used to write the "seeds", which is a list of all
classes and members which match a keep rule.
proguard_usage: File. Optional file used to write all classes and members that are removed
Expand Down Expand Up @@ -272,10 +269,6 @@ def _optimization_action(
args.add("-printmapping", proguard_output_map)
outputs.append(proguard_output_map)

if proguard_output_proto_map:
args.add("-protomapping", proguard_output_proto_map)
outputs.append(proguard_output_proto_map)

if proguard_seeds:
args.add("-printseeds", proguard_seeds)
outputs.append(proguard_seeds)
Expand Down Expand Up @@ -390,15 +383,9 @@ def _get_proguard_output(
"""Helper method to get a struct of all proguard outputs."""
config_output = _get_proguard_temp_artifact(ctx, "_proguard.config")

# TODO(timpeut): this is a google3 internal artifact
proto_mapping = None
if getattr(ctx.attr, "proguard_generate_mapping", False):
proto_mapping = _get_proguard_temp_artifact(ctx, "_proguard.pbmap")

return struct(
output_jar = proguard_output_jar,
mapping = proguard_output_map,
proto_mapping = proto_mapping,
seeds = proguard_seeds,
usage = proguard_usage,
library_jar = combined_library_jar,
Expand Down Expand Up @@ -462,7 +449,6 @@ def _create_optimization_actions(
proguard_specs,
proguard_mapping = proguard_mapping,
proguard_output_map = outputs.mapping,
proguard_output_proto_map = outputs.proto_mapping,
proguard_seeds = outputs.seeds,
proguard_usage = outputs.usage,
proguard_config_output = outputs.config,
Expand All @@ -485,7 +471,6 @@ def _create_optimization_actions(
proguard_specs,
proguard_mapping = proguard_mapping,
proguard_output_map = None,
proguard_output_proto_map = None,
proguard_seeds = outputs.seeds,
proguard_usage = None,
proguard_config_output = None,
Expand Down Expand Up @@ -548,7 +533,6 @@ def _create_optimization_actions(
proguard_specs,
proguard_mapping = proguard_mapping,
proguard_output_map = outputs.mapping,
proguard_output_proto_map = outputs.proto_mapping,
proguard_seeds = None,
proguard_usage = outputs.usage,
proguard_config_output = outputs.config,
Expand Down

0 comments on commit a764568

Please sign in to comment.