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