Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(934)

Unified Diff: build/android/incremental_install/create_install_script.py

Issue 1483683002: GN(android): Use list of libraries rather than native_lib_dir in all places (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review coments Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/gyp/pack_relocations.py ('k') | build/android/incremental_install/installer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/incremental_install/create_install_script.py
diff --git a/build/android/incremental_install/create_install_script.py b/build/android/incremental_install/create_install_script.py
index ff8e2c1a1a2659a3de7cb82119e17deb29272524..3de4ed67945f0796aeaa0ad50a6b6cae0c58fd39 100755
--- a/build/android/incremental_install/create_install_script.py
+++ b/build/android/incremental_install/create_install_script.py
@@ -37,14 +37,14 @@ def _ResolvePath(path):
# Exported to allow test runner to be able to install incremental apks.
def GetInstallParameters():
apk_path = {apk_path}
- lib_dir = {lib_dir}
+ native_libs = {native_libs}
dex_files = {dex_files}
splits = {splits}
show_proguard_warning = {show_proguard_warning}
return dict(apk_path=_ResolvePath(apk_path),
dex_files=[_ResolvePath(p) for p in dex_files],
- lib_dir=_ResolvePath(lib_dir),
+ native_libs=[_ResolvePath(p) for p in native_libs],
show_proguard_warning=show_proguard_warning,
splits=[_ResolvePath(p) for p in splits])
@@ -57,8 +57,8 @@ def main():
_ResolvePath(cmd_path),
'--output-directory', _ResolvePath(output_directory),
]
- if params['lib_dir']:
- cmd_args.extend(('--lib-dir', params['lib_dir']))
+ for native_lib in params['native_libs']:
+ cmd_args.extend(('--native_lib', native_lib))
for dex_path in params['dex_files']:
cmd_args.extend(('--dex-file', dex_path))
for split in params['splits']:
@@ -92,8 +92,11 @@ def _ParseArgs(args):
default=[],
help='A glob matching the apk splits. '
'Can be specified multiple times.')
- parser.add_argument('--lib-dir',
- help='Path to native libraries directory.')
+ parser.add_argument('--native-libs',
+ action='append',
+ default=[],
+ help='GYP-list of paths to native libraries. Can be '
+ 'repeated.')
parser.add_argument('--dex-file',
action='append',
default=[],
@@ -108,6 +111,10 @@ def _ParseArgs(args):
options = parser.parse_args(args)
options.dex_files += build_utils.ParseGypList(options.dex_file_list)
+ all_libs = []
+ for gyp_list in options.native_libs:
+ all_libs.extend(build_utils.ParseGypList(gyp_list))
+ options.native_libs = all_libs
return options
@@ -125,7 +132,7 @@ def main(args):
'cmd_path': pformat(relativize(installer_path)),
'apk_path': pformat(relativize(options.apk_path)),
'output_directory': pformat(relativize(options.output_directory)),
- 'lib_dir': pformat(relativize(options.lib_dir)),
+ 'native_libs': pformat([relativize(p) for p in options.native_libs]),
'dex_files': pformat([relativize(p) for p in options.dex_files]),
'show_proguard_warning': pformat(options.show_proguard_warning),
'splits': pformat([relativize(p) for p in options.splits]),
« no previous file with comments | « build/android/gyp/pack_relocations.py ('k') | build/android/incremental_install/installer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698