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

Side by Side Diff: build/android/gyp/package_resources.py

Issue 1411283009: Reland Reland Reland Switch Chrome Android using v8 arch specific external data name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missed BUILD.gn Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 output_paths = [ options.apk_path ] 289 output_paths = [ options.apk_path ]
290 290
291 if options.create_density_splits: 291 if options.create_density_splits:
292 for _, dst_path in _GenerateDensitySplitPaths(options.apk_path): 292 for _, dst_path in _GenerateDensitySplitPaths(options.apk_path):
293 output_paths.append(dst_path) 293 output_paths.append(dst_path)
294 output_paths.extend( 294 output_paths.extend(
295 _GenerateLanguageSplitOutputPaths(options.apk_path, 295 _GenerateLanguageSplitOutputPaths(options.apk_path,
296 options.language_splits)) 296 options.language_splits))
297 297
298 input_paths = [ options.android_manifest ] + options.resource_zips 298 input_paths = [ options.android_manifest ] + options.resource_zips
299
300 input_strings = []
301 input_strings.extend(package_command)
302
303 # The md5_check.py doesn't count file path in md5 intentionally,
304 # in order to repackage resources when assets' name changed, we need
305 # to put assets into input_strings, as we know the assets path isn't
306 # changed among each build if there is no asset change.
299 if options.asset_dir and os.path.exists(options.asset_dir): 307 if options.asset_dir and os.path.exists(options.asset_dir):
308 asset_paths = []
300 for root, _, filenames in os.walk(options.asset_dir): 309 for root, _, filenames in os.walk(options.asset_dir):
301 input_paths.extend(os.path.join(root, f) for f in filenames) 310 asset_paths.extend(os.path.join(root, f) for f in filenames)
311 input_paths.extend(asset_paths)
312 input_strings.extend(sorted(asset_paths))
302 313
303 build_utils.CallAndWriteDepfileIfStale( 314 build_utils.CallAndWriteDepfileIfStale(
304 lambda: _OnStaleMd5(package_command, options), 315 lambda: _OnStaleMd5(package_command, options),
305 options, 316 options,
306 input_paths=input_paths, 317 input_paths=input_paths,
307 input_strings=package_command, 318 input_strings=input_strings,
308 output_paths=output_paths) 319 output_paths=output_paths)
309 320
310 321
311 if __name__ == '__main__': 322 if __name__ == '__main__':
312 main(sys.argv[1:]) 323 main(sys.argv[1:])
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/ApkAssets.java ('k') | build/android/v8_external_startup_data_arch_suffix.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698