Split populate_stubs out of populate_dist am: 661845d4ec
Original change: https://android-review.googlesource.com/c/platform/packages/modules/common/+/1957399 Change-Id: If7b7efe09606f7fa2f9219d360baa74fcada825e
This commit is contained in:
@@ -392,6 +392,7 @@ class SdkDistProducer:
|
|||||||
sdk_versions = SDK_VERSIONS
|
sdk_versions = SDK_VERSIONS
|
||||||
self.build_sdks(sdk_versions, modules)
|
self.build_sdks(sdk_versions, modules)
|
||||||
self.populate_dist(sdk_versions, modules)
|
self.populate_dist(sdk_versions, modules)
|
||||||
|
self.populate_stubs(modules)
|
||||||
|
|
||||||
def build_sdks(self, sdk_versions, modules):
|
def build_sdks(self, sdk_versions, modules):
|
||||||
self.snapshot_builder.build_snapshots(sdk_versions, modules)
|
self.snapshot_builder.build_snapshots(sdk_versions, modules)
|
||||||
@@ -406,7 +407,7 @@ class SdkDistProducer:
|
|||||||
extract_matching_files_from_zip(
|
extract_matching_files_from_zip(
|
||||||
sdk_path, dest_dir, r"sdk_library/[^/]+/[^/]+\.(txt|jar|srcjar)")
|
sdk_path, dest_dir, r"sdk_library/[^/]+/[^/]+\.(txt|jar|srcjar)")
|
||||||
|
|
||||||
def populate_dist(self, sdk_versions, modules):
|
def populate_stubs(self, modules):
|
||||||
# TODO(b/199759953): Remove stubs once it is no longer used by gantry.
|
# TODO(b/199759953): Remove stubs once it is no longer used by gantry.
|
||||||
# Clear and populate the stubs directory.
|
# Clear and populate the stubs directory.
|
||||||
stubs_dir = os.path.join(self.dist_dir, "stubs")
|
stubs_dir = os.path.join(self.dist_dir, "stubs")
|
||||||
@@ -420,6 +421,7 @@ class SdkDistProducer:
|
|||||||
if sdk.endswith("-sdk"):
|
if sdk.endswith("-sdk"):
|
||||||
self.unzip_current_stubs(sdk, apex)
|
self.unzip_current_stubs(sdk, apex)
|
||||||
|
|
||||||
|
def populate_dist(self, sdk_versions, modules):
|
||||||
# Clear and populate the mainline-sdks dist directory.
|
# Clear and populate the mainline-sdks dist directory.
|
||||||
sdks_dist_dir = os.path.join(self.dist_dir, "mainline-sdks")
|
sdks_dist_dir = os.path.join(self.dist_dir, "mainline-sdks")
|
||||||
shutil.rmtree(sdks_dist_dir, ignore_errors=True)
|
shutil.rmtree(sdks_dist_dir, ignore_errors=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user