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/surfaces",
55 "//mandoline/services/core_services",
58 "$root_out_dir/core_services.mojo",
59 "$root_out_dir/html_viewer",
60 "$root_out_dir/lib.stripped/libbootstrap.so",
61 "$root_out_dir/network_service.mojo",
62 "$root_out_dir/obj/mojo/runner/bootstrap_java.dex.jar",
63 "$root_out_dir/surfaces_service.mojo",
67 generate_mojo_shell_assets_list("build_mandoline_assets") {
69 ":copy_mandoline_assets",
71 dir = mandoline_assets_dir
74 android_apk("mandoline_apk") {
75 apk_name = "Mandoline"
77 android_manifest = "apk/AndroidManifest.xml"
79 native_libs = [ "libmandoline_runner.so" ]
81 asset_location = mandoline_assets_dir
84 ":build_mandoline_assets",
85 ":copy_mandoline_runner",
87 "//mojo/runner:resources",
89 "//components/native_viewport:native_viewport_java",
90 "//third_party/android_tools:google_play_services_default_resources",