| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Adds the code parts to a resource APK.""" | 7 """Adds the code parts to a resource APK.""" |
| 8 | 8 |
| 9 import argparse | 9 import argparse |
| 10 import itertools | 10 import itertools |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 'secondary native libraries') | 62 'secondary native libraries') |
| 63 parser.add_argument('--native-lib-placeholders', | 63 parser.add_argument('--native-lib-placeholders', |
| 64 help='GYP-list of native library placeholders to add.', | 64 help='GYP-list of native library placeholders to add.', |
| 65 default='[]') | 65 default='[]') |
| 66 parser.add_argument('--emma-device-jar', | 66 parser.add_argument('--emma-device-jar', |
| 67 help='Path to emma_device.jar to include.') | 67 help='Path to emma_device.jar to include.') |
| 68 parser.add_argument('--uncompress-shared-libraries', | 68 parser.add_argument('--uncompress-shared-libraries', |
| 69 action='store_true', | 69 action='store_true', |
| 70 help='Uncompress shared libraries') | 70 help='Uncompress shared libraries') |
| 71 options = parser.parse_args(args) | 71 options = parser.parse_args(args) |
| 72 options.assets = build_utils.ParseGypList(options.assets) | 72 options.assets = build_utils.ParseGnList(options.assets) |
| 73 options.uncompressed_assets = build_utils.ParseGypList( | 73 options.uncompressed_assets = build_utils.ParseGnList( |
| 74 options.uncompressed_assets) | 74 options.uncompressed_assets) |
| 75 options.native_lib_placeholders = build_utils.ParseGypList( | 75 options.native_lib_placeholders = build_utils.ParseGnList( |
| 76 options.native_lib_placeholders) | 76 options.native_lib_placeholders) |
| 77 all_libs = [] | 77 all_libs = [] |
| 78 for gyp_list in options.native_libs: | 78 for gyp_list in options.native_libs: |
| 79 all_libs.extend(build_utils.ParseGypList(gyp_list)) | 79 all_libs.extend(build_utils.ParseGnList(gyp_list)) |
| 80 options.native_libs = all_libs | 80 options.native_libs = all_libs |
| 81 secondary_libs = [] | 81 secondary_libs = [] |
| 82 for gyp_list in options.secondary_native_libs: | 82 for gyp_list in options.secondary_native_libs: |
| 83 secondary_libs.extend(build_utils.ParseGypList(gyp_list)) | 83 secondary_libs.extend(build_utils.ParseGnList(gyp_list)) |
| 84 options.secondary_native_libs = secondary_libs | 84 options.secondary_native_libs = secondary_libs |
| 85 | 85 |
| 86 | 86 |
| 87 if not options.android_abi and (options.native_libs or | 87 if not options.android_abi and (options.native_libs or |
| 88 options.native_lib_placeholders): | 88 options.native_lib_placeholders): |
| 89 raise Exception('Must specify --android-abi with --native-libs') | 89 raise Exception('Must specify --android-abi with --native-libs') |
| 90 if not options.secondary_android_abi and options.secondary_native_libs: | 90 if not options.secondary_android_abi and options.secondary_native_libs: |
| 91 raise Exception('Must specify --secondary-android-abi with' | 91 raise Exception('Must specify --secondary-android-abi with' |
| 92 ' --secondary-native-libs') | 92 ' --secondary-native-libs') |
| 93 return options | 93 return options |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 on_stale_md5, | 302 on_stale_md5, |
| 303 options, | 303 options, |
| 304 input_paths=input_paths, | 304 input_paths=input_paths, |
| 305 input_strings=input_strings, | 305 input_strings=input_strings, |
| 306 output_paths=[options.output_apk], | 306 output_paths=[options.output_apk], |
| 307 depfile_deps=depfile_deps) | 307 depfile_deps=depfile_deps) |
| 308 | 308 |
| 309 | 309 |
| 310 if __name__ == '__main__': | 310 if __name__ == '__main__': |
| 311 main(sys.argv[1:]) | 311 main(sys.argv[1:]) |
| OLD | NEW |