| Index: build/android/gyp/apkbuilder.py
|
| diff --git a/build/android/gyp/apkbuilder.py b/build/android/gyp/apkbuilder.py
|
| index 404d4dac9d564c2b8d3f3fa0c613acbe0a6216d3..648940de04de7b1157162c1123f6bdf7ae4b8428 100755
|
| --- a/build/android/gyp/apkbuilder.py
|
| +++ b/build/android/gyp/apkbuilder.py
|
| @@ -45,10 +45,13 @@ def _ParseArgs(args):
|
| required=True)
|
| parser.add_argument('--dex-file',
|
| help='Path to the classes.dex to use')
|
| - # TODO(agrieve): Switch this to be a list of files rather than a directory.
|
| + # TODO(agrieve): Pass all libs via --native-libs and remove --native-libs-dir.
|
| parser.add_argument('--native-libs-dir',
|
| help='Directory containing native libraries to include',
|
| default=[])
|
| + parser.add_argument('--native-libs',
|
| + help='List of native libraries to include',
|
| + default='[]')
|
| parser.add_argument('--android-abi',
|
| help='Android architecture to use for native libraries')
|
| parser.add_argument('--native-lib-placeholders',
|
| @@ -60,12 +63,14 @@ def _ParseArgs(args):
|
| options.assets = build_utils.ParseGypList(options.assets)
|
| options.uncompressed_assets = build_utils.ParseGypList(
|
| options.uncompressed_assets)
|
| + options.native_libs = build_utils.ParseGypList(options.native_libs)
|
| options.native_lib_placeholders = build_utils.ParseGypList(
|
| options.native_lib_placeholders)
|
|
|
| - if not options.android_abi and (options.native_libs_dir or
|
| + if not options.android_abi and (options.native_libs or
|
| + options.native_libs_dir or
|
| options.native_lib_placeholders):
|
| - raise Exception('Must specify --android-abi with --native-libs-dir')
|
| + raise Exception('Must specify --android-abi when native libs exist.')
|
| return options
|
|
|
|
|
| @@ -122,9 +127,9 @@ def main(args):
|
| args = build_utils.ExpandFileArgs(args)
|
| options = _ParseArgs(args)
|
|
|
| - native_libs = []
|
| + native_libs = options.native_libs
|
| if options.native_libs_dir:
|
| - native_libs = _ListSubPaths(options.native_libs_dir)
|
| + native_libs += _ListSubPaths(options.native_libs_dir)
|
|
|
| input_paths = [options.resource_apk, __file__] + native_libs
|
| if options.dex_file:
|
|
|