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

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

Issue 293003010: Combine base_java.jar, net_java.jar and url_java.jar into cronet.jar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« components/cronet.gypi ('K') | « components/cronet.gypi ('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
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved.
Paweł Hajdan Jr. 2014/05/22 13:34:42 nit: 2014
mef 2014/05/22 22:28:09 Done.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 import fnmatch
8 import optparse
9 import os
10 import sys
11
12 REPOSITORY_ROOT = os.path.abspath(os.path.join(
13 os.path.dirname(__file__), '..', '..', '..'))
14
15 sys.path.append(os.path.join(REPOSITORY_ROOT, 'build/android/gyp/util'))
16 import build_utils
17
18
19 def ExtractJars(options):
20 # The paths of the files in the jar will be the same as they are passed in to
21 # the command. Because of this, the command should be run in
22 # options.classes_dir so the .class file paths in the jar are correct.
23 jar_cwd = options.classes_dir
24 build_utils.DeleteDirectory(jar_cwd)
25 build_utils.MakeDirectory(jar_cwd);
Paweł Hajdan Jr. 2014/05/22 13:34:42 nit: Remove ; from the end, too much c++ ;-)
mef 2014/05/22 22:28:09 Done.
26 for jar in build_utils.ParseGypList(options.jars):
27 jar_path = os.path.abspath(jar)
28 jar_cmd = ['jar', 'xf', jar_path]
29 build_utils.CheckOutput(jar_cmd, cwd=jar_cwd)
30
31
32 def main():
33 parser = optparse.OptionParser()
34 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('--stamp', help='Path to touch on success.')
37
38 options, _ = parser.parse_args()
39
40 ExtractJars(options)
41
42 if options.stamp:
43 build_utils.Touch(options.stamp)
44
45
46 if __name__ == '__main__':
47 sys.exit(main())
48
OLDNEW
« components/cronet.gypi ('K') | « components/cronet.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698