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

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

Issue 2214013002: [Cronet] add base proguard flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 years, 4 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
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 #
3 # Copyright 2016 The Chromium Authors. All rights reserved.
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 optparse
8 import sys
9
10 # Combines files in |input_files| as one proguard file and write that to
11 # |output_file|
12 def GenerateProguardFile(output_file, input_files):
13 try:
14 with open(output_file, "wb") as target:
15 for input_file in input_files:
16 with open(input_file, "rb") as current:
17 target.write(current.read())
mef 2016/08/10 01:25:35 what would happen if there is no newline at the en
xunjieli 2016/08/11 21:05:53 Done. You are right. That will be bad. I changed i
18 except IOError:
19 raise Exception("Proguard file generation failed")
20
21
22 def main():
23 parser = optparse.OptionParser()
24 parser.add_option('--output-file',
25 help='Output file for the generated proguard file')
26
27 options, input_files = parser.parse_args()
28 GenerateProguardFile(options.output_file, input_files)
29
30
31 if __name__ == '__main__':
32 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698