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

Side by Side Diff: components/cronet/tools/jar_src.py

Issue 2336173003: Fix android depfiles to always list GN's outputs[0] (Closed)
Patch Set: fix cronet_package Created 4 years, 3 months 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
« no previous file with comments | « components/cronet/tools/generate_javadoc.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import optparse 7 import optparse
8 import os 8 import os
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 src_dirs = [] 64 src_dirs = []
65 for src_dir in options.src_dir: 65 for src_dir in options.src_dir:
66 src_dirs.extend(build_utils.ParseGnList(src_dir)) 66 src_dirs.extend(build_utils.ParseGnList(src_dir))
67 if unzipped_jar_path: 67 if unzipped_jar_path:
68 src_dirs += [unzipped_jar_path] 68 src_dirs += [unzipped_jar_path]
69 69
70 for src_dir in src_dirs: 70 for src_dir in src_dirs:
71 JarSources(src_dir, options.jar_path) 71 JarSources(src_dir, options.jar_path)
72 72
73 if options.depfile: 73 if options.depfile:
74 input_paths = [] 74 deps = []
75 for src_dir in src_dirs: 75 for src_dir in src_dirs:
76 for root, _, filenames in os.walk(src_dir): 76 for root, _, filenames in os.walk(src_dir):
77 input_paths.extend(os.path.join(root, f) for f in filenames) 77 deps.extend(os.path.join(root, f) for f in filenames)
78 build_utils.WriteDepfile(options.depfile, 78 build_utils.WriteDepfile(options.depfile, options.jar_path, deps)
79 input_paths + build_utils.GetPythonDependencies()) 79
80 # Clean up temporary output directory. 80 # Clean up temporary output directory.
81 if unzipped_jar_path: 81 if unzipped_jar_path:
82 build_utils.DeleteDirectory(unzipped_jar_path) 82 build_utils.DeleteDirectory(unzipped_jar_path)
83 83
84 if options.stamp: 84 if options.stamp:
85 build_utils.Touch(options.stamp) 85 build_utils.Touch(options.stamp)
86 86
87 if __name__ == '__main__': 87 if __name__ == '__main__':
88 sys.exit(main()) 88 sys.exit(main())
89 89
OLDNEW
« no previous file with comments | « components/cronet/tools/generate_javadoc.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698