Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fuchsia] stamp package with target api level #30857

Merged
merged 1 commit into from
Jan 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions tools/fuchsia/build_fuchsia_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def CopyZirconFFILibIfExists(source, destination):
destination_base = os.path.join(destination, 'flutter_binaries')
FindFileAndCopyTo('libzircon_ffi.so', source_root, destination_base)

def CopyToBucketWithMode(source, destination, aot, product, runner_type):
def CopyToBucketWithMode(source, destination, aot, product, runner_type, api_level):
mode = 'aot' if aot else 'jit'
product_suff = '_product' if product else ''
runner_name = '%s_%s%s_runner' % (runner_type, mode, product_suff)
Expand All @@ -142,7 +142,7 @@ def CopyToBucketWithMode(source, destination, aot, product, runner_type):
key_path = os.path.join(_script_dir, 'development.key')

destination = os.path.join(_bucket_directory, destination, mode)
CreateFarPackage(pm_bin, far_base, key_path, destination)
CreateFarPackage(pm_bin, far_base, key_path, destination, api_level)
patched_sdk_dirname = '%s_runner_patched_sdk' % runner_type
patched_sdk_dir = os.path.join(source_root, patched_sdk_dirname)
dest_sdk_path = os.path.join(destination, patched_sdk_dirname)
Expand All @@ -154,10 +154,17 @@ def CopyToBucketWithMode(source, destination, aot, product, runner_type):


def CopyToBucket(src, dst, product=False):
CopyToBucketWithMode(src, dst, False, product, 'flutter')
CopyToBucketWithMode(src, dst, True, product, 'flutter')
CopyToBucketWithMode(src, dst, False, product, 'dart')
CopyToBucketWithMode(src, dst, True, product, 'dart')
api_level = ReadTargetAPILevel()
CopyToBucketWithMode(src, dst, False, product, 'flutter', api_level)
CopyToBucketWithMode(src, dst, True, product, 'flutter', api_level)
CopyToBucketWithMode(src, dst, False, product, 'dart', api_level)
CopyToBucketWithMode(src, dst, True, product, 'dart', api_level)

def ReadTargetAPILevel():
filename = os.path.join(os.path.dirname(__file__), 'target_api_level')
with open(filename) as f:
api_level = f.read().rstrip('\n')
return api_level


def CopyVulkanDepsToBucket(src, dst, arch):
Expand Down
4 changes: 2 additions & 2 deletions tools/fuchsia/gen_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ def GenerateManifest(package_dir):
return manifest_path


def CreateFarPackage(pm_bin, package_dir, signing_key, dst_dir):
def CreateFarPackage(pm_bin, package_dir, signing_key, dst_dir, api_level):
manifest_path = GenerateManifest(package_dir)

pm_command_base = [
pm_bin, '-m', manifest_path, '-k', signing_key, '-o', dst_dir
pm_bin, '-m', manifest_path, '-k', signing_key, '-o', dst_dir, '--api-level', api_level
]

# Build the package
Expand Down