aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2023-11-29 17:52:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-11-29 17:52:58 +0000
commitc0661c91a5d1b4f03a67bd7b0d7a0a9575c1c771 (patch)
treec8fb4c29d1d7c337d50c95e72e57740aa87eed7d
parent7ed9da0995be1dbc732f3d2d36c427cca8cdc0c2 (diff)
parent6d6755189d9380cc494d9158ad482de422f3beb5 (diff)
downloadcommon-c0661c91a5d1b4f03a67bd7b0d7a0a9575c1c771.tar.gz
Generate Gantry Metadata and API Diff for NEXT release am: 6d6755189d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/2850969 Change-Id: Idc9a3423f3baac8041fcedf3028d97dcf7e0114f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rwxr-xr-xbuild/mainline_modules_sdks.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/build/mainline_modules_sdks.py b/build/mainline_modules_sdks.py
index 8888220b..a8c21f15 100755
--- a/build/mainline_modules_sdks.py
+++ b/build/mainline_modules_sdks.py
@@ -712,6 +712,9 @@ class BuildRelease:
# false because flagged APIs are not suitable for use outside Android.
include_flagged_apis: bool = False
+ # Whether the build release should generate Gantry metadata and API diff.
+ generate_gantry_metadata_and_api_diff: bool = False
+
def __post_init__(self):
# The following use object.__setattr__ as this object is frozen and
# attempting to set the fields directly would cause an exception to be
@@ -825,6 +828,7 @@ NEXT = BuildRelease(
# There are no build release specific environment variables to pass to
# Soong.
soong_env={},
+ generate_gantry_metadata_and_api_diff=True,
)
# The build release for the latest build supported by this build, i.e. the
@@ -838,6 +842,7 @@ LATEST = BuildRelease(
# Latest must include flagged APIs because it may be dropped into the main
# Android branches.
include_flagged_apis=True,
+ generate_gantry_metadata_and_api_diff=True,
)
@@ -1274,7 +1279,7 @@ class SdkDistProducer:
modules = [m for m in modules if not m.is_bundled()]
snapshots_dir = self.snapshot_builder.build_snapshots(
build_release, modules)
- if build_release == LATEST:
+ if build_release.generate_gantry_metadata_and_api_diff:
target_dict = self.snapshot_builder.build_sdk_scope_targets(
build_release, modules)
self.snapshot_builder.build_snapshot_gantry_metadata_and_api_diff(
@@ -1322,7 +1327,7 @@ class SdkDistProducer:
for module in modules:
for sdk in module.sdks:
sdk_dist_dir = os.path.join(build_release_dist_dir, SDK_VERSION)
- if build_release == LATEST:
+ if build_release.generate_gantry_metadata_and_api_diff:
self.dist_sdk_snapshot_gantry_metadata_and_api_diff(
sdk_dist_dir, sdk, module, snapshots_dir)
self.populate_dist_snapshot(build_release, module, sdk,