Add sdk modules list in build artifacts root.
Add list of all the sdk supported modules in sdk-modules.txt. This file should generate for all builds (even when only non-sdk modules build is requested). The file only contains modules which are requested by the build, and supports sdk. Bug: 242316893 Test: Generate sdk-modules.txt in the dist directory root. Test: atest --host mainline_modules_sdks_test --no-bazel-mode Change-Id: Ic8aa3c63209717e1076c4c51f1232dd5afcdd6d4
This commit is contained in:
@@ -1269,6 +1269,13 @@ class SdkDistProducer:
|
||||
shutil.copy(sdk_gantry_metadata_json_path,
|
||||
sdk_dist_gantry_metadata_json_path)
|
||||
|
||||
def dist_generate_sdk_supported_modules_file(self, modules):
|
||||
sdk_modules_file = os.path.join(self.dist_dir, "sdk-modules.txt")
|
||||
with open(sdk_modules_file, "w", encoding="utf8") as file:
|
||||
for module in modules:
|
||||
if module in MAINLINE_MODULES:
|
||||
file.write(aosp_to_google_name(module.apex) + "\n")
|
||||
|
||||
def populate_unbundled_dist(self, build_release, modules, snapshots_dir):
|
||||
build_release_dist_dir = os.path.join(self.mainline_sdks_dir,
|
||||
build_release.sub_dir)
|
||||
@@ -1532,6 +1539,7 @@ def main(args):
|
||||
modules += PLATFORM_SDKS_FOR_MAINLINE
|
||||
|
||||
producer = create_producer(args.tool_path)
|
||||
producer.dist_generate_sdk_supported_modules_file(modules)
|
||||
producer.produce_dist(modules, build_releases)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user