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

Unified Diff: mojo/public/mojo_application.gni

Issue 898853006: Java content handler for Android. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/mojo_application.gni
diff --git a/mojo/public/mojo_application.gni b/mojo/public/mojo_application.gni
index 19abf7410ab3e4370a43b21094ab69e43395d62e..97fa819e7477bb133cb94737ac0290e56a26a12a 100644
--- a/mojo/public/mojo_application.gni
+++ b/mojo/public/mojo_application.gni
@@ -161,7 +161,6 @@ if (is_android) {
# input_dex_jar: the .dex.jar file to bundle
# output_name (optional): override for the output file name
template("mojo_android_application") {
- assert(defined(invoker.input_so))
qsr 2015/02/05 16:50:07 What is the use case where you do not have an inpu
etiennej 2015/02/06 16:22:29 None. Actually, I merged the two new templates as
assert(defined(invoker.input_dex_jar))
zip_action_name = "${target_name}_zip"
@@ -215,4 +214,36 @@ if (is_android) {
]
}
}
+
+ template("mojo_android_java_application") {
+ assert(defined(invoker.input_dex_jar))
+
+ if (defined(invoker.output_name)) {
+ mojo_output = "$root_out_dir/" + invoker.output_name + ".mojo"
+ } else {
+ mojo_output = "$root_out_dir/" + target_name + ".mojo"
+ }
+
+ action(target_name) {
+ script = rebase_path("mojo/public/tools/prepend.py", ".", mojo_root)
+
+ input = invoker.input_dex_jar
+ inputs = [
+ input,
+ ]
+
+ output = mojo_output
+ outputs = [
+ output,
+ ]
+
+ rebase_input = rebase_path(input, root_build_dir)
+ rebase_output = rebase_path(output, root_build_dir)
+ args = [
+ "--input=$rebase_input",
+ "--output=$rebase_output",
+ "--line=#!mojo mojo:java_handler",
+ ]
+ }
+ }
}

Powered by Google App Engine
This is Rietveld 408576698