| OLD | NEW |
| 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 # Rules to generate python packaged applications for Dart | 5 # Rules to generate python packaged applications for Dart |
| 6 | 6 |
| 7 import("//build/module_args/mojo.gni") | 7 import("//build/module_args/mojo.gni") |
| 8 | 8 |
| 9 template("dart_package") { | 9 template("dart_package") { |
| 10 package_target_name = "$target_name" | 10 package_target_name = "$target_name" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 deps = [] | 55 deps = [] |
| 56 zip_inputs = [] | 56 zip_inputs = [] |
| 57 | 57 |
| 58 if (defined(invoker.uses_pub) && invoker.uses_pub) { | 58 if (defined(invoker.uses_pub) && invoker.uses_pub) { |
| 59 deps += [ ":${package_target_name}_repackage" ] | 59 deps += [ ":${package_target_name}_repackage" ] |
| 60 } | 60 } |
| 61 | 61 |
| 62 if (defined(invoker.deps)) { | 62 if (defined(invoker.deps)) { |
| 63 deps += invoker.deps | 63 deps += invoker.deps |
| 64 foreach(d, deps) { | 64 } |
| 65 dep_name = get_label_info(d, "name") | 65 |
| 66 dep_target_out_dir = get_label_info(d, "target_out_dir") | 66 foreach(d, deps) { |
| 67 zip_inputs += [ "$dep_target_out_dir/$dep_name.dartzip" ] | 67 dep_name = get_label_info(d, "name") |
| 68 } | 68 dep_target_out_dir = get_label_info(d, "target_out_dir") |
| 69 zip_inputs += [ "$dep_target_out_dir/$dep_name.dartzip" ] |
| 69 } | 70 } |
| 70 | 71 |
| 71 if (defined(invoker.datadeps)) { | 72 if (defined(invoker.datadeps)) { |
| 72 datadeps = invoker.datadeps | 73 datadeps = invoker.datadeps |
| 73 } | 74 } |
| 74 | 75 |
| 75 output = package_output | 76 output = package_output |
| 76 outputs = [ | 77 outputs = [ |
| 77 output, | 78 output, |
| 78 ] | 79 ] |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 deps += invoker.mojom_deps | 182 deps += invoker.mojom_deps |
| 182 } | 183 } |
| 183 if (defined(invoker.datadeps)) { | 184 if (defined(invoker.datadeps)) { |
| 184 datadeps = invoker.datadeps | 185 datadeps = invoker.datadeps |
| 185 } | 186 } |
| 186 | 187 |
| 187 line = "#!mojo mojo:dart_content_handler" | 188 line = "#!mojo mojo:dart_content_handler" |
| 188 if (is_debug || (defined(invoker.strict) && invoker.strict == true)) { | 189 if (is_debug || (defined(invoker.strict) && invoker.strict == true)) { |
| 189 line = "#!mojo mojo:dart_content_handler?strict=true" | 190 line = "#!mojo mojo:dart_content_handler?strict=true" |
| 190 } | 191 } |
| 192 if (defined(invoker.uses_sky) && invoker.uses_sky) { |
| 193 line = "#!mojo mojo:sky_packaged_app_viewer" |
| 194 } |
| 191 | 195 |
| 192 rebase_input = rebase_path(input, root_build_dir) | 196 rebase_input = rebase_path(input, root_build_dir) |
| 193 rebase_output = rebase_path(output, root_build_dir) | 197 rebase_output = rebase_path(output, root_build_dir) |
| 194 args = [ | 198 args = [ |
| 195 "--input=$rebase_input", | 199 "--input=$rebase_input", |
| 196 "--output=$rebase_output", | 200 "--output=$rebase_output", |
| 197 "--line=$line", | 201 "--line=$line", |
| 198 ] | 202 ] |
| 199 } | 203 } |
| 200 } | 204 } |
| OLD | NEW |