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

Side by Side Diff: third_party/protobuf/protobuf_lite_java_descriptor_proto.py

Issue 556933002: Remove protobuf lite for java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase before submit Created 6 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 | « third_party/protobuf/protobuf.gyp ('k') | third_party/protobuf/protobuf_lite_java_parse_pom.py » ('j') | 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Generate java DescriptorProto file.
7
8 Usage:
9 protobuf_lite_java_descriptor_proto.py {protoc} {java_out} {include} {proto_ files}
10
11 This is a helper file for the protobuf_lite_java_gen_descriptor_proto action in
12 protobuf.gyp.
13
14 It performs the following steps:
15 1. Recursively deletes old java_out directory.
16 2. Creates java_out directory.
17 3. Generates Java descriptor proto file using protoc.
18 """
19
20 import os
21 import shutil
22 import subprocess
23 import sys
24
25 def main(argv):
26 if len(argv) < 4:
27 usage()
28 return 1
29
30 protoc_path, java_out, include = argv[1:4]
31 proto_files = argv[4:]
32
33 # Delete all old sources
34 if os.path.exists(java_out):
35 shutil.rmtree(java_out)
36
37 # Create source directory
38 os.makedirs(java_out)
39
40 # Generate Java files using protoc
41 return subprocess.call(
42 [protoc_path, '--java_out', java_out, '-I' + include]
43 + proto_files)
44
45 def usage():
46 print(__doc__);
47
48 if __name__ == '__main__':
49 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « third_party/protobuf/protobuf.gyp ('k') | third_party/protobuf/protobuf_lite_java_parse_pom.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698