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

Unified Diff: mojo/services/html_viewer/BUILD.gn

Issue 1002033004: Gets packaging of html_viewer for android working (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years, 9 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 | « no previous file | mojo/services/html_viewer/android/android_hooks.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/html_viewer/BUILD.gn
diff --git a/mojo/services/html_viewer/BUILD.gn b/mojo/services/html_viewer/BUILD.gn
index 4a8d4091ef3035ca133195e5d3fd2c4a77866d1e..b649ae39bb90bfdbfffc8f3572b295bf422c3863 100644
--- a/mojo/services/html_viewer/BUILD.gn
+++ b/mojo/services/html_viewer/BUILD.gn
@@ -110,13 +110,65 @@ source_set("lib") {
]
}
-mojo_native_application("html_viewer") {
- sources = [
- "html_viewer.cc",
- ]
- deps = [
- ":lib",
- ]
+if (is_android) {
+ import("//build/config/android/rules.gni")
+
+ java_library_path = "$target_out_dir/java_library.dex.jar"
+
+ mojo_android_application("html_viewer") {
+ input_so = "$root_out_dir/lib.stripped/libhtml_viewer_lib.so"
+ input_dex_jar = java_library_path
+ }
+
+ shared_library("html_viewer_lib") {
+ sources = [
+ "android/android_hooks.cc",
+ "html_viewer.cc",
+ ]
+
+ deps = [
+ ":html_viewer_jni_headers",
+ ":lib",
+ "//base",
+ "//ui/gfx:gfx_jni_headers",
+ ]
+ }
+
+ generate_jni("html_viewer_jni_headers") {
+ sources = [
+ "android/java/org/chromium/html_viewer/Main.java",
+ ]
+ jni_package = "mojo/services/html_viewer"
+ }
+
+ android_library("html_viewer_java_classes") {
+ java_files = [ "android/java/org/chromium/html_viewer/Main.java" ]
+
+ deps = [
+ "//base:base_java",
+ ]
+ }
+
+ android_standalone_library("java_library") {
+ dex_path = java_library_path
+
+ deps = [
+ ":html_viewer_java_classes",
+
+ # TODO(sky): this is WAY more than we need. We really only need
+ # DeviceDisplayInfo. Refactor to make this clearer.
+ "//ui/android:ui_java",
+ ]
+ }
+} else {
+ mojo_native_application("html_viewer") {
+ sources = [
+ "html_viewer.cc",
+ ]
+ deps = [
+ ":lib",
+ ]
+ }
}
test("tests") {
« no previous file with comments | « no previous file | mojo/services/html_viewer/android/android_hooks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698