Index: mojo/public/mojo_application.gni |
diff --git a/mojo/public/mojo_application.gni b/mojo/public/mojo_application.gni |
index 2c7ee4aec41a4b9ba0c59a6360aff115e7d01981..42e03c2ec88eb87b00f0a4135c0c93f2d4227bb7 100644 |
--- a/mojo/public/mojo_application.gni |
+++ b/mojo/public/mojo_application.gni |
@@ -2,9 +2,7 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
-import("//build/module_args/mojo.gni") |
import("mojo.gni") |
-import("mojo_sdk.gni") |
# Generate a binary mojo application.The parameters of this template are those |
# of a shared library. |
@@ -295,6 +293,9 @@ if (is_android) { |
# Variables: |
# input_so: the .so file to bundle |
# input_dex_jar: the .dex.jar file to bundle |
+ # deps / public_deps / data_deps (optional): |
+ # Dependencies. The targets that generate the .so/jar inputs should be |
+ # listed in either deps or public_deps. |
# output_name (optional): override for the output file name |
template("mojo_android_application") { |
assert(defined(invoker.input_so)) |
@@ -302,7 +303,9 @@ if (is_android) { |
zip_action_name = "${target_name}_zip" |
zip_action_output = "$target_gen_dir/${target_name}.zip" |
+ prepend_action_name = target_name |
action(zip_action_name) { |
+ visibility = [ ":$prepend_action_name" ] |
script = "//build/android/gn/zip.py" |
inputs = [ |
@@ -321,6 +324,16 @@ if (is_android) { |
"--inputs=$rebase_inputs", |
"--output=$rebase_output", |
] |
+ |
+ if (defined(invoker.deps)) { |
+ deps = invoker.deps |
+ } |
+ if (defined(invoker.public_deps)) { |
+ public_deps = invoker.public_deps |
+ } |
+ if (defined(invoker.data_deps)) { |
+ data_deps = invoker.data_deps |
+ } |
} |
if (defined(invoker.output_name)) { |
@@ -349,6 +362,10 @@ if (is_android) { |
"--output=$rebase_output", |
"--line=#!mojo mojo:android_handler", |
] |
+ |
+ public_deps = [ |
+ ":$zip_action_name", |
+ ] |
} |
} |
} |