1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
7 import("//third_party/mojo/src/mojo/public/mojo.gni")
8 import("//build/config/android/config.gni")
9 import("//build/config/android/rules.gni")
10 import("//mojo/generate_mojo_shell_assets_list.gni")
12 mandoline_assets_dir = "$root_build_dir/mandoline_assets"
20 executable("mandoline_runner") {
23 "//mojo/environment:chromium",
24 "//mojo/runner:mojo_runner_lib",
28 "../core_services_initialization.cc",
29 "mandoline_context_init.cc",
32 # On android, the executable is also the native library used by the apk.
33 # It means dynamic symbols must be preserved and exported.
34 ldflags = [ "-Wl,--export-dynamic" ]
37 copy("copy_mandoline_runner") {
42 "$root_out_dir/exe.stripped/mandoline_runner",
45 "$root_out_dir/lib.stripped/libmandoline_runner.so",
49 copy_ex("copy_mandoline_assets") {
51 dest = mandoline_assets_dir
53 "//components/html_viewer",
54 "//components/view_manager",
55 "//components/view_manager/surfaces",
56 "//mandoline/services/core_services",
57 "//mojo/runner:bootstrap",
58 "//mojo/runner:bootstrap_java",
59 "//mojo/services/network",
62 "$root_out_dir/core_services.mojo",
63 "$root_out_dir/html_viewer",
64 "$root_out_dir/lib.stripped/libbootstrap.so",
65 "$root_out_dir/network_service.mojo",
66 "$root_out_dir/obj/mojo/runner/bootstrap_java.dex.jar",
67 "$root_out_dir/surfaces_service.mojo",
71 generate_mojo_shell_assets_list("build_mandoline_assets") {
73 ":copy_mandoline_assets",
75 dir = mandoline_assets_dir
78 android_apk("mandoline_apk") {
79 apk_name = "Mandoline"
81 android_manifest = "apk/AndroidManifest.xml"
83 native_libs = [ "libmandoline_runner.so" ]
85 asset_location = mandoline_assets_dir
88 ":build_mandoline_assets",
89 ":copy_mandoline_runner",
91 "//mojo/runner:resources",
93 "//components/view_manager:view_manager_java",
94 "//third_party/android_tools:google_play_services_default_resources",