| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 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 # pylint: disable=C0301 | 7 # pylint: disable=C0301 |
| 8 """Package resources into an apk. | 8 """Package resources into an apk. |
| 9 | 9 |
| 10 See https://android.googlesource.com/platform/tools/base/+/master/legacy/ant-tas
ks/src/main/java/com/android/ant/AaptExecTask.java | 10 See https://android.googlesource.com/platform/tools/base/+/master/legacy/ant-tas
ks/src/main/java/com/android/ant/AaptExecTask.java |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 'package', | 119 'package', |
| 120 '--version-code', options.version_code, | 120 '--version-code', options.version_code, |
| 121 '--version-name', options.version_name, | 121 '--version-name', options.version_name, |
| 122 '-M', options.android_manifest, | 122 '-M', options.android_manifest, |
| 123 '--no-crunch', | 123 '--no-crunch', |
| 124 '-f', | 124 '-f', |
| 125 '--auto-add-overlay', | 125 '--auto-add-overlay', |
| 126 | 126 |
| 127 '-I', android_jar, | 127 '-I', android_jar, |
| 128 '-F', options.apk_path, | 128 '-F', options.apk_path, |
| 129 '--ignore-assets', build_utils.AAPT_IGNORE_PATTERN, |
| 129 ] | 130 ] |
| 130 | 131 |
| 131 if options.no_compress: | 132 if options.no_compress: |
| 132 for ext in options.no_compress.split(','): | 133 for ext in options.no_compress.split(','): |
| 133 package_command += ['-0', ext] | 134 package_command += ['-0', ext] |
| 134 | 135 |
| 135 if os.path.exists(options.asset_dir): | 136 if os.path.exists(options.asset_dir): |
| 136 package_command += ['-A', options.asset_dir] | 137 package_command += ['-A', options.asset_dir] |
| 137 | 138 |
| 138 dep_zips = build_utils.ParseGypList(options.resource_zips) | 139 dep_zips = build_utils.ParseGypList(options.resource_zips) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 150 package_command, print_stdout=False, print_stderr=False) | 151 package_command, print_stdout=False, print_stderr=False) |
| 151 | 152 |
| 152 if options.depfile: | 153 if options.depfile: |
| 153 build_utils.WriteDepfile( | 154 build_utils.WriteDepfile( |
| 154 options.depfile, | 155 options.depfile, |
| 155 build_utils.GetPythonDependencies()) | 156 build_utils.GetPythonDependencies()) |
| 156 | 157 |
| 157 | 158 |
| 158 if __name__ == '__main__': | 159 if __name__ == '__main__': |
| 159 main() | 160 main() |
| OLD | NEW |