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

Side by Side Diff: mojo/dart/embedder/embedder.gni

Issue 1539673003: Generate Mojom Types in Dart (Take 2) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Update to master and regenerate mojoms Created 4 years, 11 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
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 # Template to generate a dart embedder package. 5 # Template to generate a dart embedder package.
6 # Required invoker inputs: 6 # Required invoker inputs:
7 # String package (relative path to package e.g. mojo/public/interfaces/applica tion) 7 # String package (relative path to package e.g. mojo/public/interfaces/applica tion)
8 template("dart_embedder_package") { 8 template("dart_embedder_package") {
9 package = invoker.package 9 package = invoker.package
10 package_path = "//$package" 10 package_path = "//$package"
11 11
12 destination = package 12 destination = package
13 if (defined(invoker.destination)) { 13 if (defined(invoker.destination)) {
14 destination = invoker.destination 14 destination = invoker.destination
15 } 15 }
16 16
17 is_bindings_types = ""
zra 2016/01/15 21:01:33 Make this a boolean flag passed by the invoker, e.
alexfandrianto 2016/01/20 00:08:29 Done.
18 if (defined(invoker.is_bindings_types)) {
19 is_bindings_types = invoker.is_bindings_types
20 }
21
17 action_foreach(target_name) { 22 action_foreach(target_name) {
18 deps = [ 23 deps = [
19 package_path, 24 package_path,
20 ] 25 ]
21 list_generated_bindings_script = 26 list_generated_bindings_script =
22 rebase_path( 27 rebase_path(
23 "//mojo/dart/embedder/tools/dart_list_generated_bindings.py") 28 "//mojo/dart/embedder/tools/dart_list_generated_bindings.py")
24 root_prefix = rebase_path("//") 29 root_prefix = rebase_path("//")
25 source_directory = rebase_path(package_path) 30 source_directory = rebase_path(package_path)
26 generated_bindings = exec_script(list_generated_bindings_script, 31 generated_bindings = exec_script(list_generated_bindings_script,
27 [ 32 [
28 source_directory, 33 source_directory,
29 root_prefix, 34 root_prefix,
35 is_bindings_types,
30 ], 36 ],
31 "list lines") 37 "list lines")
32 sources = rebase_path(generated_bindings, ".", root_gen_dir) 38 sources = rebase_path(generated_bindings, ".", root_gen_dir)
33 outputs = [ 39 outputs = [
34 "$root_gen_dir/dart_embedder_packages/$destination/{{source_file_part}}", 40 "$root_gen_dir/dart_embedder_packages/$destination/{{source_file_part}}",
35 ] 41 ]
36 script = rebase_path( 42 script = rebase_path(
37 "//mojo/dart/embedder/tools/dart_rewrite_embedder_package_imports.py ") 43 "//mojo/dart/embedder/tools/dart_rewrite_embedder_package_imports.py ")
38 args = [ 44 args = [
39 rebase_path("{{source}}", "", root_build_dir), 45 rebase_path("{{source}}", "", root_build_dir),
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 ] 94 ]
89 if (defined(invoker.input_directory)) { 95 if (defined(invoker.input_directory)) {
90 args += [ 96 args += [
91 "--client_root", 97 "--client_root",
92 rebase_path(invoker.input_directory), 98 rebase_path(invoker.input_directory),
93 ] 99 ]
94 } 100 }
95 args += rebase_path(invoker.inputs) 101 args += rebase_path(invoker.inputs)
96 } 102 }
97 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698