Skip to content

Commit

Permalink
Drop support for setting manifest_merger via the --android_manifest_m…
Browse files Browse the repository at this point in the history
…erger flag.

The current behavior is that we set the manifest_merger default value to "auto" which takes the value from the flag. The flag's default value is "android". So, instead, we set the attribute's default value to "android" and stop checking the flag.

PiperOrigin-RevId: 713718420
Change-Id: I95def179508de0db4ec0f88bdbe894925424494d
  • Loading branch information
ajsinclair authored and copybara-github committed Jan 9, 2025
1 parent 96bbb71 commit eb08200
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rules/android_binary/attrs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ATTRS = _attrs.replace(
instruments = attr.label(),
manifest_values = attr.string_dict(),
manifest_merger = attr.string(
default = "auto",
default = "android",
values = ["auto", "legacy", "android", "force_android"],
),
native_target = attr.label(
Expand Down
10 changes: 1 addition & 9 deletions rules/android_binary/impl.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -565,15 +565,7 @@ def use_legacy_manifest_merger(ctx):
Returns:
Boolean indicating whether legacy manifest merging is enabled.
"""
manifest_merger = ctx.attr.manifest_merger
android_manifest_merger = ctx.fragments.android.manifest_merger

if android_manifest_merger == "force_android":
return False
if manifest_merger == "auto":
manifest_merger = android_manifest_merger

return manifest_merger == "legacy"
return ctx.attr.manifest_merger == "legacy"

def finalize(
ctx,
Expand Down

0 comments on commit eb08200

Please sign in to comment.