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>
This commit is contained in:
@@ -712,6 +712,9 @@ class BuildRelease:
|
|||||||
# false because flagged APIs are not suitable for use outside Android.
|
# false because flagged APIs are not suitable for use outside Android.
|
||||||
include_flagged_apis: bool = False
|
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):
|
def __post_init__(self):
|
||||||
# The following use object.__setattr__ as this object is frozen and
|
# The following use object.__setattr__ as this object is frozen and
|
||||||
# attempting to set the fields directly would cause an exception to be
|
# 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
|
# There are no build release specific environment variables to pass to
|
||||||
# Soong.
|
# Soong.
|
||||||
soong_env={},
|
soong_env={},
|
||||||
|
generate_gantry_metadata_and_api_diff=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
# The build release for the latest build supported by this build, i.e. the
|
# 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
|
# Latest must include flagged APIs because it may be dropped into the main
|
||||||
# Android branches.
|
# Android branches.
|
||||||
include_flagged_apis=True,
|
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()]
|
modules = [m for m in modules if not m.is_bundled()]
|
||||||
snapshots_dir = self.snapshot_builder.build_snapshots(
|
snapshots_dir = self.snapshot_builder.build_snapshots(
|
||||||
build_release, modules)
|
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(
|
target_dict = self.snapshot_builder.build_sdk_scope_targets(
|
||||||
build_release, modules)
|
build_release, modules)
|
||||||
self.snapshot_builder.build_snapshot_gantry_metadata_and_api_diff(
|
self.snapshot_builder.build_snapshot_gantry_metadata_and_api_diff(
|
||||||
@@ -1322,7 +1327,7 @@ class SdkDistProducer:
|
|||||||
for module in modules:
|
for module in modules:
|
||||||
for sdk in module.sdks:
|
for sdk in module.sdks:
|
||||||
sdk_dist_dir = os.path.join(build_release_dist_dir, SDK_VERSION)
|
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(
|
self.dist_sdk_snapshot_gantry_metadata_and_api_diff(
|
||||||
sdk_dist_dir, sdk, module, snapshots_dir)
|
sdk_dist_dir, sdk, module, snapshots_dir)
|
||||||
self.populate_dist_snapshot(build_release, module, sdk,
|
self.populate_dist_snapshot(build_release, module, sdk,
|
||||||
|
|||||||
Reference in New Issue
Block a user