Commit dc93b97b authored by Eric Stevenson's avatar Eric Stevenson Committed by Commit Bot

Android: Clarify "build-bundle-apks" argument usage.

--sdk-version isn't currently used, but it's a bit misleading that it
implies --minimal.

This CL changes app_bundle_utils.GenerateBundleApks to enforce minimal
to be passed for --sdk-version to work.

Bug: 996362
Change-Id: I808273d92f73cd50015101da551df04d53ad6d2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1779008Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Eric Stevenson <estevenson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#692199}
parent 2cdd1329
...@@ -1525,8 +1525,7 @@ class _BuildBundleApks(_Command): ...@@ -1525,8 +1525,7 @@ class _BuildBundleApks(_Command):
help='Build .apks archive that targets the bundle\'s minSdkVersion and ' help='Build .apks archive that targets the bundle\'s minSdkVersion and '
'contains only english splits. It still contains optional splits.') 'contains only english splits. It still contains optional splits.')
group.add_argument( group.add_argument(
'--sdk-version', '--sdk-version', help='The sdkVersion to build the .apks for.')
help='Implies --minimal. The sdkVersion to build the .apks for.')
group.add_argument( group.add_argument(
'--build-mode', '--build-mode',
choices=app_bundle_utils.BUILD_APKS_MODES, choices=app_bundle_utils.BUILD_APKS_MODES,
...@@ -1540,7 +1539,7 @@ class _BuildBundleApks(_Command): ...@@ -1540,7 +1539,7 @@ class _BuildBundleApks(_Command):
_GenerateBundleApks( _GenerateBundleApks(
self.bundle_generation_info, self.bundle_generation_info,
self.args.output_apks, self.args.output_apks,
minimal=self.args.sdk_version is not None or self.args.minimal, minimal=self.args.minimal,
minimal_sdk_version=self.args.sdk_version, minimal_sdk_version=self.args.sdk_version,
mode=self.args.build_mode) mode=self.args.build_mode)
......
...@@ -72,6 +72,10 @@ def GenerateBundleApks(bundle_path, ...@@ -72,6 +72,10 @@ def GenerateBundleApks(bundle_path,
or "system_compressed". or "system_compressed".
""" """
device_spec = None device_spec = None
if minimal_sdk_version:
assert minimal or system_image_locales, (
'minimal_sdk_version is only used when minimal or system_image_locales '
'is specified')
if minimal: if minimal:
# Measure with one language split installed. Use Hindi because it is # Measure with one language split installed. Use Hindi because it is
# popular. resource_size.py looks for splits/base-hi.apk. # popular. resource_size.py looks for splits/base-hi.apk.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment