mandoline: Allow running the aura/views UI on android.
[chromium-blink-merge.git] / mandoline / services / core_services / BUILD.gn
blobbec66ad5d12a0655744b878bcb05a065ebdbe843
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.
5 # core_services should be thought of as a bundle of many of the services which
6 # we ship with.
8 import("//build/config/ui.gni")
9 import("//third_party/mojo/src/mojo/public/mojo_application.gni")
10 import("//testing/test.gni")
12 if (is_android) {
13   import("//build/config/android/rules.gni")
15   java_library_path = "$target_out_dir/java_library.dex.jar"
17   mojo_android_application("core_services") {
18     input_so = "$root_out_dir/lib.stripped/libcore_services.so"
19     input_dex_jar = java_library_path
20     deps = [
21       ":java_library",
22       ":native_library",
23     ]
24   }
26   shared_library("native_library") {
27     output_name = "core_services"
29     sources = [
30       "android_hooks.cc",
31     ]
33     deps = [
34       ":sources",
35       "//base",
36       "//components/resource_provider:jni_headers",
37       "//net",
38       "//third_party/mojo/src/mojo/public/c/system:for_shared_library",
39     ]
40   }
42   android_standalone_library("java_library") {
43     dex_path = java_library_path
45     deps = [
46       "//components/resource_provider:java_library",
47       "//net/android:net_java",
48     ]
49   }
50 } else {
51   mojo_native_application("core_services") {
52     deps = [
53       ":sources",
54     ]
55   }
58 source_set("sources") {
59   sources = [
60     "core_services_application_delegate.cc",
61     "main.cc",
62   ]
64   deps = [
65     "//base",
66     "//components/clipboard:lib",
67     "//components/filesystem:lib",
68     "//components/resource_provider:lib",
69     "//components/view_manager:lib",
70     "//components/view_manager/surfaces:lib",
71     "//mandoline/ui/browser:lib",
72     "//mojo/application/public/cpp",
73     "//mojo/common:tracing_impl",
74     "//mojo/services/network:lib",
75     "//mojo/services/tracing:lib",
76   ]
78   if (use_aura) {
79     deps += [
80       "//components/view_manager/public/cpp",
81       "//mandoline/ui/omnibox:lib",
82     ]
83   }