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

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

Issue 16238002: [Android] Raise a compile time error if style resource is under values/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 | « no previous file | 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 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 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 """Convert Android xml resources to API 14 compatible. 7 """Convert Android xml resources to API 14 compatible.
8 8
9 There are two reasons that we cannot just use API 17 attributes, 9 There are two reasons that we cannot just use API 17 attributes,
10 so we are generating another set of resources by this script. 10 so we are generating another set of resources by this script.
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 GenerateV14LayoutResourcesInDir(input_dir, output_v14_dir, output_v17_dir) 260 GenerateV14LayoutResourcesInDir(input_dir, output_v14_dir, output_v17_dir)
261 elif resource_type == 'values': 261 elif resource_type == 'values':
262 if 'v17' in qualifiers: 262 if 'v17' in qualifiers:
263 output_qualifiers = qualifiers[:] 263 output_qualifiers = qualifiers[:]
264 del output_qualifiers[qualifiers.index('v17')] 264 del output_qualifiers[qualifiers.index('v17')]
265 output_v14_dir = os.path.join(options.res_v14_compatibility_dir, 265 output_v14_dir = os.path.join(options.res_v14_compatibility_dir,
266 '-'.join([resource_type] + 266 '-'.join([resource_type] +
267 output_qualifiers)) 267 output_qualifiers))
268 GenerateV14StyleResourcesInDir(input_dir, output_v14_dir) 268 GenerateV14StyleResourcesInDir(input_dir, output_v14_dir)
269 else: 269 else:
270 # TODO(kkimlabs): uncomment the below line and remove 'pass' once the 270 ErrorIfStyleResourceExistsInDir(input_dir)
271 # downstream fix (https://gerrit-int.chromium.org/#/c/38786/) is landed.
272 # ErrorIfStyleResourceExistsInDir(input_dir)
273 pass
274 271
275 if options.stamp: 272 if options.stamp:
276 build_utils.Touch(options.stamp) 273 build_utils.Touch(options.stamp)
277 274
278 if __name__ == '__main__': 275 if __name__ == '__main__':
279 sys.exit(main(sys.argv)) 276 sys.exit(main(sys.argv))
280 277
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698