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

Unified Diff: third_party/dom_distiller_js/BUILD.gn

Issue 2034373002: Generate the proto JSON converter for DOM distiller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better docs and dependency, format 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/dom_distiller_js/protoc_plugins/README.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/dom_distiller_js/BUILD.gn
diff --git a/third_party/dom_distiller_js/BUILD.gn b/third_party/dom_distiller_js/BUILD.gn
index 15663d8014b12d405ddb149dbf34cebe23381bf3..323b3716449c1fcf6accff5a163b72eb242ff371 100644
--- a/third_party/dom_distiller_js/BUILD.gn
+++ b/third_party/dom_distiller_js/BUILD.gn
@@ -4,15 +4,13 @@
import("//third_party/protobuf/proto_library.gni")
-config("dependent_config") {
- include_dirs = [ "//third_party/dom_distiller_js/dist/proto_gen" ]
-}
-
group("proto") {
public_deps = [
":dom_distiller_proto",
]
- public_configs = [ ":dependent_config" ]
+ deps = [
+ ":json_values_converter_tests",
+ ]
}
proto_library("dom_distiller_proto") {
@@ -21,4 +19,59 @@ proto_library("dom_distiller_proto") {
"dist/proto/dom_distiller.proto",
]
proto_out_dir = "third_party/dom_distiller_js"
+ 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
+
+ # Depends on protoc_plugins properly
+ inputs = [
+ "protoc_plugins/json_values_converter.py",
+ "protoc_plugins/util/__init__.py",
+ "protoc_plugins/util/plugin.py",
+ "protoc_plugins/util/plugin_protos.py",
+ "protoc_plugins/util/types.py",
+ "protoc_plugins/util/writer.py",
+ ]
+}
+
+# The purpose of json_values_converter_test_proto is to test the
+# protoc_plugins by generating the json_converter.h file.
+proto_library("json_values_converter_test_proto") {
+ visibility = [ ":*" ]
+ sources = [
+ "test_sample.proto",
+ ]
+ proto_out_dir = "third_party/dom_distiller_js"
+ json_converter = "protoc_plugins/json_values_converter.py"
+
+ # Depends on protoc_plugins properly
+ inputs = [
+ "protoc_plugins/json_values_converter.py",
+ "protoc_plugins/util/__init__.py",
+ "protoc_plugins/util/plugin.py",
+ "protoc_plugins/util/plugin_protos.py",
+ "protoc_plugins/util/types.py",
+ "protoc_plugins/util/writer.py",
+ ]
+ generate_python = false
+ generate_cc = false
+}
+
+action("json_values_converter_tests") {
+ _stamp = "$target_gen_dir/json_values_converter_tests.stamp"
+ deps = [
+ ":json_values_converter_test_proto",
+ ]
+ inputs = [
+ "test_sample_json_converter.h.golden",
+ ]
+ outputs = [
+ _stamp,
+ ]
+
+ script = "protoc_plugins/json_values_converter_tests.py"
+ args = [
+ "--stamp",
+ rebase_path(_stamp, root_build_dir),
+ rebase_path("$target_gen_dir/test_sample_json_converter.h", root_build_dir),
+ rebase_path("test_sample_json_converter.h.golden", root_build_dir),
+ ]
}
« no previous file with comments | « no previous file | third_party/dom_distiller_js/protoc_plugins/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698