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

Unified Diff: services/android/rules.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
« no previous file with comments | « services/android/java_handler.cc ('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
new file mode 100644
index 0000000000000000000000000000000000000000..35c021ab5c28871cadc3c58a484cf1d3acee7b49
--- /dev/null
+++ b/services/android/rules.gni
@@ -0,0 +1,65 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/android/rules.gni")
+import("//mojo/public/mojo_application.gni")
+
+template("mojo_android_java_application") {
+ assert(defined(invoker.mojo_main))
+
+ dex_output_path = "$target_out_dir/${target_name}.dex.jar"
+
+ android_lib_name = "__${target_name}_lib"
+ android_standalone_name = "__${target_name}_standalone"
+
+ all_deps = [
+ "//mojo/public/java:system",
+ "//mojo/public/java:bindings",
+ ]
+ if (defined(invoker.deps)) {
+ all_deps += invoker.deps
+ }
+
+ android_library(android_lib_name) {
+ java_files = invoker.sources
+
+ manifest_entries = [ "Mojo-Class:" + invoker.mojo_main ]
+
+ deps = all_deps
+ }
+
+ android_standalone_library(android_standalone_name) {
+ deps = [ ":${android_lib_name}" ] + all_deps
+
+ dex_path = dex_output_path
+ }
+
+ 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 = dex_output_path
+ 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",
+ ]
+ }
+}
« no previous file with comments | « services/android/java_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698