Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / content / public / android / BUILD.gn
blobfc73050b0d4176af2904a4b97ec0bea66cab699a
1 # Copyright 2014 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/config.gni")
6 import("//build/config/android/rules.gni")
8 content_jni_gypi_values = exec_script("//build/gypi_to_gn.py",
9                                       [ rebase_path("../../content_jni.gypi") ],
10                                       "scope",
11                                       [ "../../content_jni.gypi" ])
13 android_aidl("common_aidl") {
14   interface_file = "java/src/org/chromium/content/common/common.aidl"
15   import_include = "java/src"
16   sources = [
17     "java/src/org/chromium/content/common/IChildProcessCallback.aidl",
18     "java/src/org/chromium/content/common/IChildProcessService.aidl",
19   ]
22 android_resources("content_java_resources") {
23   deps = [
24     ":content_strings_grd",
25     "//ui/android:ui_java_resources",
26   ]
27   custom_package = "org.chromium.content"
28   resource_dirs = [ "java/res" ]
31 android_library("content_java") {
32   deps = [
33     ":content_java_resources",
34     "//base:base_java",
35     "//device/battery/android:battery_monitor_android",
36     "//device/battery:mojo_bindings_java",
37     "//device/bluetooth:java",
38     "//media/base/android:media_java",
39     "//media/midi:midi_java",
40     "//mojo/android:system_java",
41     "//net/android:net_java",
42     "//third_party/android_tools:android_support_v13_java",
43     "//third_party/mojo/src/mojo/public/java:bindings",
44     "//third_party/mojo/src/mojo/public/java:system",
45     "//ui/accessibility:ui_accessibility_java",
46     "//ui/android:ui_java",
47     "//third_party/jsr-305:jsr_305_javalib",
48     "//third_party/WebKit/public:blink_headers_java",
50     #"//content:content_common",
51   ]
53   if (android_sdk_version != "M") {
54     deps += [ "//third_party/android_tools:preview_java_sources" ]
55   }
57   srcjar_deps = [
58     ":common_aidl",
59     ":content_public_android_java_enums_srcjar",
60     "//content/browser/accessibility:content_browser_accessibility_java_enums_srcjar",
61     "//ui/touch_selection:ui_touch_selection_enums_srcjar",
62     "//ui/touch_selection:ui_touch_handle_orientation_srcjar",
63   ]
65   DEPRECATED_java_in_dir = "java/src"
68 java_strings_grd("content_strings_grd") {
69   grd_file = "java/strings/android_content_strings.grd"
70   outputs = [
71     "values-am/android_content_strings.xml",
72     "values-ar/android_content_strings.xml",
73     "values-bg/android_content_strings.xml",
74     "values-ca/android_content_strings.xml",
75     "values-cs/android_content_strings.xml",
76     "values-da/android_content_strings.xml",
77     "values-de/android_content_strings.xml",
78     "values-el/android_content_strings.xml",
79     "values/android_content_strings.xml",
80     "values-en-rGB/android_content_strings.xml",
81     "values-es/android_content_strings.xml",
82     "values-es-rUS/android_content_strings.xml",
83     "values-fa/android_content_strings.xml",
84     "values-fi/android_content_strings.xml",
85     "values-tl/android_content_strings.xml",
86     "values-fr/android_content_strings.xml",
87     "values-hi/android_content_strings.xml",
88     "values-hr/android_content_strings.xml",
89     "values-hu/android_content_strings.xml",
90     "values-in/android_content_strings.xml",
91     "values-it/android_content_strings.xml",
92     "values-iw/android_content_strings.xml",
93     "values-ja/android_content_strings.xml",
94     "values-ko/android_content_strings.xml",
95     "values-lt/android_content_strings.xml",
96     "values-lv/android_content_strings.xml",
97     "values-nl/android_content_strings.xml",
98     "values-nb/android_content_strings.xml",
99     "values-pl/android_content_strings.xml",
100     "values-pt-rBR/android_content_strings.xml",
101     "values-pt-rPT/android_content_strings.xml",
102     "values-ro/android_content_strings.xml",
103     "values-ru/android_content_strings.xml",
104     "values-sk/android_content_strings.xml",
105     "values-sl/android_content_strings.xml",
106     "values-sr/android_content_strings.xml",
107     "values-sv/android_content_strings.xml",
108     "values-sw/android_content_strings.xml",
109     "values-th/android_content_strings.xml",
110     "values-tr/android_content_strings.xml",
111     "values-uk/android_content_strings.xml",
112     "values-vi/android_content_strings.xml",
113     "values-zh-rCN/android_content_strings.xml",
114     "values-zh-rTW/android_content_strings.xml",
115   ]
118 java_cpp_enum("content_public_android_java_enums_srcjar") {
119   sources = [
120     "//content/browser/android/content_view_core_impl.cc",
121     "//content/browser/android/gesture_event_type.h",
122     "//content/browser/gamepad/gamepad_standard_mappings.h",
123     "//content/public/browser/invalidate_type.h",
124     "//content/public/browser/navigation_controller.h",
125     "//content/public/browser/readback_types.h",
126     "//content/public/common/console_message_level.h",
127     "//content/public/common/result_codes.h",
128     "//content/public/common/screen_orientation_values.h",
129     "//content/public/common/speech_recognition_error.h",
130     "//content/public/common/top_controls_state.h",
131   ]
132   outputs = [
133     "org/chromium/content/browser/GestureEventType.java",
134     "org/chromium/content/browser/input/CanonicalAxisIndex.java",
135     "org/chromium/content/browser/input/CanonicalButtonIndex.java",
136     "org/chromium/content/browser/input/PopupItemType.java",
137     "org/chromium/content_public/browser/InvalidateTypes.java",
138     "org/chromium/content_public/browser/navigation_controller/LoadURLType.java",
139     "org/chromium/content_public/browser/navigation_controller/UserAgentOverrideOption.java",
140     "org/chromium/content_public/browser/readback_types/ReadbackResponse.java",
141     "org/chromium/content_public/common/ConsoleMessageLevel.java",
142     "org/chromium/content_public/common/ResultCode.java",
143     "org/chromium/content_public/common/ScreenOrientationValues.java",
144     "org/chromium/content_public/common/SpeechRecognitionErrorCode.java",
145     "org/chromium/content_public/common/TopControlsState.java",
146   ]
149 generate_jar_jni("jar_jni") {
150   jni_package = "content"
151   classes = [
152     "java/util/HashSet.class",
153     "android/view/MotionEvent.class",
154   ]
157 generate_jni("content_jni_headers") {
158   sources = rebase_path(content_jni_gypi_values.sources, "", "../..")
159   jni_package = "content"
162 group("jni") {
163   deps = [
164     ":content_jni_headers",
165     ":jar_jni",
166   ]
169 android_library("content_javatests") {
170   testonly = true
171   deps = [
172     "//base:base_java",
173     "//base:base_java_test_support",
174     "//content/public/test/android:content_java_test_support",
175     "//content/shell/android:content_shell_java",
176     "//content/shell/android:content_shell_java_resources",
177     "//content/shell/android:content_shell_apk_java",
178     "//content/shell/android:content_shell_test_java",
179     "//media/base/android:media_java",
180     "//mojo/android:system_java",
181     "//net/android:net_java",
182     "//net/android:net_java_test_support",
183     "//third_party/android_tools:android_support_v13_java",
184     "//third_party/mojo/src/mojo/public/interfaces/bindings/tests:test_interfaces_java",
185     "//third_party/mojo/src/mojo/public/java:bindings",
186     "//third_party/mojo/src/mojo/public/java:system",
187     "//ui/android:ui_java",
188     ":content_java",
189   ]
191   DEPRECATED_java_in_dir = "javatests/src"
194 # GYP: //content/content_tests.gypi:content_junit_tests
195 junit_binary("content_junit_tests") {
196   java_files = [ "junit/src/org/chromium/content/browser/input/GamepadMappingsTest.java" ]
197   deps = [
198     ":content_java",
199     "//base:base_java",
200     "//base:base_java_test_support",
201   ]
203 # TODO(GYP): content_icudata