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

Unified Diff: services/android/rules.gni

Issue 1126393005: Fix java handler. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 7 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
« no previous file with comments | « services/android/add_manifest_entry.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/android/rules.gni
diff --git a/services/android/rules.gni b/services/android/rules.gni
index 9fe408931d30c3c8adf8ff817872d8027bacf2b0..350b421b019d453859771d3655d3d91386a0eb06 100644
--- a/services/android/rules.gni
+++ b/services/android/rules.gni
@@ -5,13 +5,18 @@
import("//build/config/android/rules.gni")
import("//mojo/public/mojo_application.gni")
+servicess_android_path = get_path_info(".", "abspath")
+
template("mojo_android_java_application") {
assert(defined(invoker.mojo_main))
dex_output_path = "$target_out_dir/${target_name}.dex.jar"
+ dex_with_manifest_output_path =
+ "$target_out_dir/${target_name}_with_manifest.dex.jar"
android_lib_name = "__${target_name}_lib"
android_standalone_name = "__${target_name}_standalone"
+ android_with_manifest_name = "__${target_name}_with_manifest"
all_deps = [
"//mojo/public/java:bindings",
@@ -24,8 +29,6 @@ template("mojo_android_java_application") {
android_library(android_lib_name) {
java_files = invoker.sources
- manifest_entries = [ "Mojo-Class:" + invoker.mojo_main ]
-
deps = all_deps
}
@@ -38,6 +41,30 @@ template("mojo_android_java_application") {
excluded_jars = [ "${system_gen_dir}/system.dex.jar" ]
}
+ action(android_with_manifest_name) {
+ script = "${servicess_android_path}/add_manifest_entry.py"
+
+ input = dex_output_path
+ inputs = [
+ input,
+ ]
+
+ output = dex_with_manifest_output_path
+ outputs = [
+ output,
+ ]
+
+ rebase_input = rebase_path(input)
+ rebase_output = rebase_path(output)
+ mojo_main = invoker.mojo_main
+ args = [
+ "--input=$rebase_input",
+ "--output=$rebase_output",
+ "--key=Mojo-Class",
+ "--value=$mojo_main",
+ ]
+ }
+
if (defined(invoker.output_name)) {
mojo_output = "$root_out_dir/" + invoker.output_name + ".mojo"
} else {
@@ -47,7 +74,7 @@ template("mojo_android_java_application") {
action(target_name) {
script = rebase_path("mojo/public/tools/prepend.py", ".", mojo_root)
- input = dex_output_path
+ input = dex_with_manifest_output_path
inputs = [
input,
]
« no previous file with comments | « services/android/add_manifest_entry.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698