Generate Gantry Metadata and API Diff for NEXT release
Bug: 299570421 Test: packages/modules/common/build/mainline_modules_sdks.sh --build-release=next Change-Id: I192f551ca670951bbba2faba632fc9f758a5de5e
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
|
||||||
@@ -820,6 +823,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
|
||||||
@@ -833,6 +837,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,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -1265,7 +1270,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(
|
||||||
@@ -1313,7 +1318,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