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

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: Merge with master Created 4 years, 10 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 | « mojo/dart/embedder/BUILD.gn ('k') | mojo/dart/embedder/tools/dart_embedder_url_mappings.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 action_foreach(target_name) { 17 action_foreach(target_name) {
18 deps = [ 18 deps = [
19 package_path, 19 package_path,
20 ] 20 ]
21 list_generated_bindings_script = 21 list_generated_bindings_script =
22 rebase_path( 22 rebase_path(
23 "//mojo/dart/embedder/tools/dart_list_generated_bindings.py") 23 "//mojo/dart/embedder/tools/dart_list_generated_bindings.py")
24 root_prefix = rebase_path("//") 24 root_prefix = rebase_path("//")
25 source_directory = rebase_path(package_path) 25 source_directory = rebase_path(package_path)
26 generated_bindings = exec_script(list_generated_bindings_script, 26
27 [ 27 arguments = [
28 source_directory, 28 source_directory,
29 root_prefix, 29 root_prefix,
30 ], 30 ]
31 "list lines") 31 if (defined(invoker.is_bindings_types) && invoker.is_bindings_types) {
32 arguments += [ "--bindings-types" ]
33 }
34
35 generated_bindings =
36 exec_script(list_generated_bindings_script, arguments, "list lines")
32 sources = rebase_path(generated_bindings, ".", root_gen_dir) 37 sources = rebase_path(generated_bindings, ".", root_gen_dir)
33 outputs = [ 38 outputs = [
34 "$root_gen_dir/dart_embedder_packages/$destination/{{source_file_part}}", 39 "$root_gen_dir/dart_embedder_packages/$destination/{{source_file_part}}",
35 ] 40 ]
36 script = rebase_path( 41 script = rebase_path(
37 "//mojo/dart/embedder/tools/dart_rewrite_embedder_package_imports.py ") 42 "//mojo/dart/embedder/tools/dart_rewrite_embedder_package_imports.py ")
38 args = [ 43 args = [
39 rebase_path("{{source}}", "", root_build_dir), 44 rebase_path("{{source}}", "", root_build_dir),
40 rebase_path( 45 rebase_path(
41 "$root_gen_dir/dart_embedder_packages/$destination/{{source_file_part} }"), 46 "$root_gen_dir/dart_embedder_packages/$destination/{{source_file_part} }"),
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 ] 93 ]
89 if (defined(invoker.input_directory)) { 94 if (defined(invoker.input_directory)) {
90 args += [ 95 args += [
91 "--client_root", 96 "--client_root",
92 rebase_path(invoker.input_directory), 97 rebase_path(invoker.input_directory),
93 ] 98 ]
94 } 99 }
95 args += rebase_path(invoker.inputs) 100 args += rebase_path(invoker.inputs)
96 } 101 }
97 } 102 }
OLDNEW
« no previous file with comments | « mojo/dart/embedder/BUILD.gn ('k') | mojo/dart/embedder/tools/dart_embedder_url_mappings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698