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

Side by Side Diff: build/android/gyp/aidl.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 | « build/android/gn/zip.py ('k') | build/android/gyp/ant.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 """Invokes Android's aidl 7 """Invokes Android's aidl
8 """ 8 """
9 9
10 import optparse 10 import optparse
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 with zipfile.ZipFile(options.srcjar, 'w') as srcjar: 47 with zipfile.ZipFile(options.srcjar, 'w') as srcjar:
48 for path in build_utils.FindInDirectory(temp_dir, '*.java'): 48 for path in build_utils.FindInDirectory(temp_dir, '*.java'):
49 with open(path) as fileobj: 49 with open(path) as fileobj:
50 data = fileobj.read() 50 data = fileobj.read()
51 pkg_name = re.search(r'^\s*package\s+(.*?)\s*;', data, re.M).group(1) 51 pkg_name = re.search(r'^\s*package\s+(.*?)\s*;', data, re.M).group(1)
52 arcname = '%s/%s' % (pkg_name.replace('.', '/'), os.path.basename(path)) 52 arcname = '%s/%s' % (pkg_name.replace('.', '/'), os.path.basename(path))
53 srcjar.writestr(arcname, data) 53 srcjar.writestr(arcname, data)
54 54
55 if options.depfile: 55 if options.depfile:
56 build_utils.WriteDepfile( 56 build_utils.WriteDepfile(options.depfile, options.srcjar)
57 options.depfile,
58 build_utils.GetPythonDependencies())
59 57
60 58
61 if __name__ == '__main__': 59 if __name__ == '__main__':
62 sys.exit(main(sys.argv)) 60 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/gn/zip.py ('k') | build/android/gyp/ant.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698