Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / android / BUILD.gn
blob852b14e119a77d2b772d215fd845457a1c41bc64
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 import("//build/config/android/rules.gni")
6 import("//testing/test.gni")
8 assert(is_android)
10 component("android") {
11   output_name = "ui_android"
12   sources = [
13     "resources/resource_manager.cc",
14     "resources/resource_manager.h",
15     "resources/resource_manager_impl.cc",
16     "resources/resource_manager_impl.h",
17     "resources/ui_resource_android.cc",
18     "resources/ui_resource_android.h",
19     "resources/ui_resource_client_android.h",
20     "resources/ui_resource_provider.cc",
21     "resources/ui_resource_provider.h",
22     "ui_android_export.h",
23     "ui_android_jni_registrar.cc",
24     "ui_android_jni_registrar.h",
25     "view_android.cc",
26     "view_android.h",
27     "window_android.cc",
28     "window_android.h",
29     "window_android_compositor.h",
30     "window_android_observer.h",
31   ]
33   defines = [ "UI_ANDROID_IMPLEMENTATION" ]
35   deps = [
36     "//base",
37     "//cc",
38     "//skia",
39     "//ui/gfx",
40     "//ui/gfx/geometry",
41     ":ui_android_jni_headers",
42   ]
45 generate_jni("ui_android_jni_headers") {
46   sources = [
47     "java/src/org/chromium/ui/base/WindowAndroid.java",
48     "java/src/org/chromium/ui/resources/ResourceManager.java",
49   ]
50   jni_package = "ui_android"
53 java_cpp_enum("java_enums_srcjar") {
54   sources = [
55     "../base/ime/text_input_type.h",
56     "../base/page_transition_types.h",
57     "../base/touch/touch_device.h",
58     "../base/window_open_disposition.h",
59     "../gfx/android/java_bitmap.h",
60     "resources/resource_manager.h",
61     "resources/system_ui_resource_type.h",
62   ]
63   outputs = [
64     "org/chromium/ui/WindowOpenDisposition.java",
65     "org/chromium/ui/base/PageTransition.java",
66     "org/chromium/ui/base/HoverType.java",
67     "org/chromium/ui/base/PointerType.java",
68     "org/chromium/ui/base/ime/TextInputType.java",
69     "org/chromium/ui/gfx/BitmapFormat.java",
70     "org/chromium/ui/resources/AndroidResourceType.java",
71     "org/chromium/ui/resources/SystemUIResourceType.java",
72   ]
75 java_strings_grd("ui_strings_grd") {
76   grd_file = "java/strings/android_ui_strings.grd"
77   outputs = [
78     "values-am/android_ui_strings.xml",
79     "values-ar/android_ui_strings.xml",
80     "values-bg/android_ui_strings.xml",
81     "values-ca/android_ui_strings.xml",
82     "values-cs/android_ui_strings.xml",
83     "values-da/android_ui_strings.xml",
84     "values-de/android_ui_strings.xml",
85     "values-el/android_ui_strings.xml",
86     "values/android_ui_strings.xml",
87     "values-en-rGB/android_ui_strings.xml",
88     "values-es/android_ui_strings.xml",
89     "values-es-rUS/android_ui_strings.xml",
90     "values-fa/android_ui_strings.xml",
91     "values-fi/android_ui_strings.xml",
92     "values-tl/android_ui_strings.xml",
93     "values-fr/android_ui_strings.xml",
94     "values-hi/android_ui_strings.xml",
95     "values-hr/android_ui_strings.xml",
96     "values-hu/android_ui_strings.xml",
97     "values-in/android_ui_strings.xml",
98     "values-it/android_ui_strings.xml",
99     "values-iw/android_ui_strings.xml",
100     "values-ja/android_ui_strings.xml",
101     "values-ko/android_ui_strings.xml",
102     "values-lt/android_ui_strings.xml",
103     "values-lv/android_ui_strings.xml",
104     "values-nl/android_ui_strings.xml",
105     "values-nb/android_ui_strings.xml",
106     "values-pl/android_ui_strings.xml",
107     "values-pt-rBR/android_ui_strings.xml",
108     "values-pt-rPT/android_ui_strings.xml",
109     "values-ro/android_ui_strings.xml",
110     "values-ru/android_ui_strings.xml",
111     "values-sk/android_ui_strings.xml",
112     "values-sl/android_ui_strings.xml",
113     "values-sr/android_ui_strings.xml",
114     "values-sv/android_ui_strings.xml",
115     "values-sw/android_ui_strings.xml",
116     "values-th/android_ui_strings.xml",
117     "values-tr/android_ui_strings.xml",
118     "values-uk/android_ui_strings.xml",
119     "values-vi/android_ui_strings.xml",
120     "values-zh-rCN/android_ui_strings.xml",
121     "values-zh-rTW/android_ui_strings.xml",
122   ]
125 android_resources("ui_java_resources") {
126   custom_package = "org.chromium.ui"
127   resource_dirs = [ "java/res" ]
128   deps = [
129     ":ui_strings_grd",
130   ]
133 android_library("ui_java") {
134   DEPRECATED_java_in_dir = "java/src"
135   deps = [
136     ":ui_java_resources",
137     "//base:base_java",
138   ]
139   srcjar_deps = [ ":java_enums_srcjar" ]
142 android_library("ui_javatests") {
143   DEPRECATED_java_in_dir = "javatests/src"
144   testonly = true
145   deps = [
146     ":ui_java_resources",
147     ":ui_java",
148     "//base:base_java",
149     "//base:base_java_test_support",
150   ]
153 test("ui_android_unittests") {
154   sources = [
155     "resources/resource_manager_impl_unittest.cc",
156     "run_all_unittests.cc",
157   ]
158   deps = [
159     ":android",
160     "//base",
161     "//base/test:test_support",
162     "//cc",
163     "//skia",
164     "//testing/gtest",
165     "//ui/base",
166     "//ui/gfx",
167     "//ui/resources:ui_test_pak",
168   ]
169   apk_deps = [ ":ui_java" ]