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

Side by Side Diff: build/android/gyp/util/build_utils.py

Issue 301543002: Revert of Remove apk-codegen.xml (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
« no previous file with comments | « build/android/gyp/process_resources.py ('k') | build/java.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import fnmatch 5 import fnmatch
6 import json 6 import json
7 import os 7 import os
8 import pipes 8 import pipes
9 import shlex 9 import shlex
10 import shutil 10 import shutil
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 # https://code.google.com/p/gyp/issues/detail?id=327 52 # https://code.google.com/p/gyp/issues/detail?id=327
53 # is addressed. 53 # is addressed.
54 gyp_string = gyp_string.replace('##', '$') 54 gyp_string = gyp_string.replace('##', '$')
55 return shlex.split(gyp_string) 55 return shlex.split(gyp_string)
56 56
57 57
58 def CheckOptions(options, parser, required=None): 58 def CheckOptions(options, parser, required=None):
59 if not required: 59 if not required:
60 return 60 return
61 for option_name in required: 61 for option_name in required:
62 if getattr(options, option_name) is None: 62 if not getattr(options, option_name):
63 parser.error('--%s is required' % option_name.replace('_', '-')) 63 parser.error('--%s is required' % option_name.replace('_', '-'))
64 64
65 def WriteJson(obj, path, only_if_changed=False): 65 def WriteJson(obj, path, only_if_changed=False):
66 old_dump = None 66 old_dump = None
67 if os.path.exists(path): 67 if os.path.exists(path):
68 with open(path, 'r') as oldfile: 68 with open(path, 'r') as oldfile:
69 old_dump = oldfile.read() 69 old_dump = oldfile.read()
70 70
71 new_dump = json.dumps(obj) 71 new_dump = json.dumps(obj)
72 72
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 144
145 def PrintWarning(message): 145 def PrintWarning(message):
146 print 'WARNING: ' + message 146 print 'WARNING: ' + message
147 147
148 148
149 def PrintBigWarning(message): 149 def PrintBigWarning(message):
150 print '***** ' * 8 150 print '***** ' * 8
151 PrintWarning(message) 151 PrintWarning(message)
152 print '***** ' * 8 152 print '***** ' * 8
OLDNEW
« no previous file with comments | « build/android/gyp/process_resources.py ('k') | build/java.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698