OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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("//third_party/protobuf/proto_library.gni") | 5 import("//third_party/protobuf/proto_library.gni") |
6 | 6 |
7 config("dependent_config") { | |
8 include_dirs = [ "//third_party/dom_distiller_js/dist/proto_gen" ] | |
9 } | |
10 | |
11 group("proto") { | 7 group("proto") { |
12 public_deps = [ | 8 public_deps = [ |
13 ":dom_distiller_proto", | 9 ":dom_distiller_proto", |
14 ] | 10 ] |
15 public_configs = [ ":dependent_config" ] | 11 deps = [ |
12 ":json_values_converter_tests", | |
13 ] | |
16 } | 14 } |
17 | 15 |
18 proto_library("dom_distiller_proto") { | 16 proto_library("dom_distiller_proto") { |
19 visibility = [ ":*" ] | 17 visibility = [ ":*" ] |
20 sources = [ | 18 sources = [ |
21 "dist/proto/dom_distiller.proto", | 19 "dist/proto/dom_distiller.proto", |
22 ] | 20 ] |
23 proto_out_dir = "third_party/dom_distiller_js" | 21 proto_out_dir = "third_party/dom_distiller_js" |
22 json_converter = "protoc_plugins/json_values_converter.py" | |
nyquist
2016/08/10 01:01:42
Is there any way that setting this json_converter
wychen
2016/08/10 01:15:05
If the plugin is a native executive, we already ha
Dirk Pranke
2016/08/11 00:33:53
I suggest for now you create a file-scoped variabl
wychen
2016/08/11 01:32:19
Done
| |
23 | |
24 # Depends on protoc_plugins properly | |
25 inputs = [ | |
26 "protoc_plugins/json_values_converter.py", | |
27 "protoc_plugins/util/__init__.py", | |
28 "protoc_plugins/util/plugin.py", | |
29 "protoc_plugins/util/plugin_protos.py", | |
30 "protoc_plugins/util/types.py", | |
31 "protoc_plugins/util/writer.py", | |
32 ] | |
24 } | 33 } |
34 | |
35 # The purpose of json_values_converter_test_proto is to test the | |
36 # protoc_plugins by generating the json_converter.h file. | |
37 proto_library("json_values_converter_test_proto") { | |
38 visibility = [ ":*" ] | |
39 sources = [ | |
40 "test_sample.proto", | |
41 ] | |
42 proto_out_dir = "third_party/dom_distiller_js" | |
43 json_converter = "protoc_plugins/json_values_converter.py" | |
44 | |
45 # Depends on protoc_plugins properly | |
46 inputs = [ | |
47 "protoc_plugins/json_values_converter.py", | |
48 "protoc_plugins/util/__init__.py", | |
49 "protoc_plugins/util/plugin.py", | |
50 "protoc_plugins/util/plugin_protos.py", | |
51 "protoc_plugins/util/types.py", | |
52 "protoc_plugins/util/writer.py", | |
53 ] | |
54 generate_python = false | |
55 generate_cc = false | |
56 } | |
57 | |
58 action("json_values_converter_tests") { | |
59 _stamp = "$target_gen_dir/json_values_converter_tests.stamp" | |
60 deps = [ | |
61 ":json_values_converter_test_proto", | |
62 ] | |
63 inputs = [ | |
64 "test_sample_json_converter.h.golden", | |
65 ] | |
66 outputs = [ | |
67 _stamp, | |
68 ] | |
69 | |
70 script = "protoc_plugins/json_values_converter_tests.py" | |
71 args = [ | |
72 "--stamp", | |
73 rebase_path(_stamp, root_build_dir), | |
74 rebase_path("$target_gen_dir/test_sample_json_converter.h", root_build_dir), | |
75 rebase_path("test_sample_json_converter.h.golden", root_build_dir), | |
76 ] | |
77 } | |
OLD | NEW |