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

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

Issue 1553623003: Port cronet_package GYP target to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix issues Created 4 years, 11 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/android/BUILD.gn ('k') | components/cronet/tools/generate_javadoc.py » ('j') | 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 fnmatch 7 import fnmatch
8 import optparse 8 import optparse
9 import os 9 import os
10 import sys 10 import sys
(...skipping 13 matching lines...) Expand all
24 build_utils.DeleteDirectory(jar_cwd) 24 build_utils.DeleteDirectory(jar_cwd)
25 build_utils.MakeDirectory(jar_cwd) 25 build_utils.MakeDirectory(jar_cwd)
26 for jar in build_utils.ParseGypList(options.jars): 26 for jar in build_utils.ParseGypList(options.jars):
27 jar_path = os.path.abspath(jar) 27 jar_path = os.path.abspath(jar)
28 jar_cmd = ['jar', 'xf', jar_path] 28 jar_cmd = ['jar', 'xf', jar_path]
29 build_utils.CheckOutput(jar_cmd, cwd=jar_cwd) 29 build_utils.CheckOutput(jar_cmd, cwd=jar_cwd)
30 30
31 31
32 def main(): 32 def main():
33 parser = optparse.OptionParser() 33 parser = optparse.OptionParser()
34 build_utils.AddDepfileOption(parser)
34 parser.add_option('--classes-dir', help='Directory to extract .class files.') 35 parser.add_option('--classes-dir', help='Directory to extract .class files.')
35 parser.add_option('--jars', help='Paths to jars to extract.') 36 parser.add_option('--jars', help='Paths to jars to extract.')
36 parser.add_option('--stamp', help='Path to touch on success.') 37 parser.add_option('--stamp', help='Path to touch on success.')
37 38
38 options, _ = parser.parse_args() 39 options, _ = parser.parse_args()
39 40
40 ExtractJars(options) 41 ExtractJars(options)
41 42
43 if options.depfile:
44 build_utils.WriteDepfile(options.depfile,
45 build_utils.GetPythonDependencies())
46
42 if options.stamp: 47 if options.stamp:
43 build_utils.Touch(options.stamp) 48 build_utils.Touch(options.stamp)
44 49
45 50
46 if __name__ == '__main__': 51 if __name__ == '__main__':
47 sys.exit(main()) 52 sys.exit(main())
48 53
OLDNEW
« no previous file with comments | « components/cronet/android/BUILD.gn ('k') | components/cronet/tools/generate_javadoc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698