| Index: build/android/gyp/apkbuilder.py
|
| diff --git a/build/android/gyp/apkbuilder.py b/build/android/gyp/apkbuilder.py
|
| index 08577cde60a4b76272f7c4c77b3ff218c9037fe8..460d15769997a673b4451ed1907831730b0c0d8b 100755
|
| --- a/build/android/gyp/apkbuilder.py
|
| +++ b/build/android/gyp/apkbuilder.py
|
| @@ -45,9 +45,10 @@ 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.
|
| - parser.add_argument('--native-libs-dir',
|
| - help='Directory containing native libraries to include',
|
| + parser.add_argument('--native-libs',
|
| + action='append',
|
| + help='GYP-list of native libraries to include. '
|
| + 'Can be specified multiple times.',
|
| default=[])
|
| parser.add_argument('--android-abi',
|
| help='Android architecture to use for native libraries')
|
| @@ -62,18 +63,17 @@ def _ParseArgs(args):
|
| options.uncompressed_assets)
|
| options.native_lib_placeholders = build_utils.ParseGypList(
|
| options.native_lib_placeholders)
|
| + all_libs = []
|
| + for gyp_list in options.native_libs:
|
| + all_libs.extend(build_utils.ParseGypList(gyp_list))
|
| + options.native_libs = all_libs
|
|
|
| - if not options.android_abi and (options.native_libs_dir or
|
| + if not options.android_abi and (options.native_libs or
|
| options.native_lib_placeholders):
|
| - raise Exception('Must specify --android-abi with --native-libs-dir')
|
| + raise Exception('Must specify --android-abi with --native-libs')
|
| return options
|
|
|
|
|
| -def _ListSubPaths(path):
|
| - """Returns a list of full paths to all files in the given path."""
|
| - return [os.path.join(path, name) for name in os.listdir(path)]
|
| -
|
| -
|
| def _SplitAssetPath(path):
|
| """Returns (src, dest) given an asset path in the form src[:dest]."""
|
| path_parts = path.split(':')
|
| @@ -122,10 +122,7 @@ def main(args):
|
| args = build_utils.ExpandFileArgs(args)
|
| options = _ParseArgs(args)
|
|
|
| - native_libs = []
|
| - if options.native_libs_dir:
|
| - native_libs = _ListSubPaths(options.native_libs_dir)
|
| - native_libs.sort()
|
| + native_libs = sorted(options.native_libs)
|
|
|
| input_paths = [options.resource_apk, __file__] + native_libs
|
| if options.dex_file:
|
|
|