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.
6 '../../chrome/chrome_android_paks.gypi', # Included for the list of pak resources.
7 '../../build/util/version.gypi'
11 'package_name': 'chrome_public_apk',
12 'manifest_package%': 'org.chromium.chrome',
13 'chrome_public_apk_manifest': '<(SHARED_INTERMEDIATE_DIR)/chrome_public_apk_manifest/AndroidManifest.xml',
14 'chrome_public_test_apk_manifest': '<(SHARED_INTERMEDIATE_DIR)/chrome_public_test_apk_manifest/AndroidManifest.xml',
16 'chrome_java_dir': 'java_staging',
17 'chrome_java_tests_dir': 'javatests',
18 'chrome_java_test_support_dir': '../test/android/javatests_staging',
19 'chrome_native_sources_dir': '../browser/android/',
20 # This list is shared with GN.
21 'chrome_staging_jni_files': [
22 '<(chrome_java_dir)/src/org/chromium/chrome/browser/bookmark/EditBookmarkHelper.java',
23 '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/CompositorView.java',
24 '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/scene_layer/ContextualSearchSceneLayer.java',
25 '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/scene_layer/ReaderModeSceneLayer.java',
26 '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/scene_layer/TabListSceneLayer.java',
27 '<(chrome_java_dir)/src/org/chromium/chrome/browser/compositor/scene_layer/TabStripSceneLayer.java',
28 '<(chrome_java_dir)/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java',
29 '<(chrome_java_dir)/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchTabHelper.java',
30 '<(chrome_java_dir)/src/org/chromium/chrome/browser/document/DocumentWebContentsDelegate.java',
31 '<(chrome_java_dir)/src/org/chromium/chrome/browser/rlz/RevenueStats.java',
32 '<(chrome_java_dir)/src/org/chromium/chrome/browser/tab/ThumbnailTabHelper.java',
34 # This list is shared with GN.
35 'chrome_staging_native_sources': [
36 '<(chrome_native_sources_dir)/bookmark/edit_bookmark_helper.cc',
37 '<(chrome_native_sources_dir)/bookmark/edit_bookmark_helper.h',
38 '<(chrome_native_sources_dir)/chrome_main_delegate_staging_android.cc',
39 '<(chrome_native_sources_dir)/chrome_main_delegate_staging_android.h',
40 '<(chrome_native_sources_dir)/compositor/compositor_view.cc',
41 '<(chrome_native_sources_dir)/compositor/compositor_view.h',
42 '<(chrome_native_sources_dir)/compositor/layer/reader_mode_layer.cc',
43 '<(chrome_native_sources_dir)/compositor/layer/reader_mode_layer.h',
44 '<(chrome_native_sources_dir)/compositor/layer/tab_handle_layer.cc',
45 '<(chrome_native_sources_dir)/compositor/layer/tab_handle_layer.h',
46 '<(chrome_native_sources_dir)/compositor/scene_layer/contextual_search_scene_layer.cc',
47 '<(chrome_native_sources_dir)/compositor/scene_layer/contextual_search_scene_layer.h',
48 '<(chrome_native_sources_dir)/compositor/scene_layer/reader_mode_scene_layer.cc',
49 '<(chrome_native_sources_dir)/compositor/scene_layer/reader_mode_scene_layer.h',
50 '<(chrome_native_sources_dir)/compositor/scene_layer/tab_list_scene_layer.cc',
51 '<(chrome_native_sources_dir)/compositor/scene_layer/tab_list_scene_layer.h',
52 '<(chrome_native_sources_dir)/compositor/scene_layer/tab_strip_scene_layer.cc',
53 '<(chrome_native_sources_dir)/compositor/scene_layer/tab_strip_scene_layer.h',
54 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_context.cc',
55 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_context.h',
56 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_delegate.cc',
57 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_delegate.h',
58 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_manager.cc',
59 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_manager.h',
60 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_tab_helper.cc',
61 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_tab_helper.h',
62 '<(chrome_native_sources_dir)/document/document_web_contents_delegate.cc',
63 '<(chrome_native_sources_dir)/rlz/revenue_stats.cc',
64 '<(chrome_native_sources_dir)/rlz/revenue_stats.h',
65 '<(chrome_native_sources_dir)/staging_jni_registrar.cc',
66 '<(chrome_native_sources_dir)/staging_jni_registrar.h',
67 '<(chrome_native_sources_dir)/tab/thumbnail_tab_helper_android.cc',
68 '<(chrome_native_sources_dir)/tab/thumbnail_tab_helper_android.h',
70 # This list is shared with GN.
71 # Defines a list of source files should be present in the open-source
72 # chrome-apk but not in the published static_library which is included in the
73 # real chrome for android.
74 'chrome_public_app_native_sources': [
75 '<(chrome_native_sources_dir)/chrome_entry_point.cc',
76 '<(chrome_native_sources_dir)/chrome_main_delegate_staging_android_initializer.cc',
77 '<(chrome_native_sources_dir)/chrome_staging_jni_onload.cc',
78 '<(chrome_native_sources_dir)/chrome_staging_jni_onload.h',
83 # GN: //chrome/browser/android:chrome_staging
84 'target_name': 'libchrome_staging',
85 'type': 'static_library',
87 'staging_jni_headers',
88 '<(DEPTH)/chrome/chrome.gyp:browser',
89 '<(DEPTH)/components/components.gyp:component_metrics_proto',
90 '<(DEPTH)/skia/skia.gyp:skia',
91 '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
94 '<@(chrome_staging_native_sources)',
98 '<(SHARED_INTERMEDIATE_DIR)/staging/android',
99 '<(android_ndk_include)', # For native_window.h, GL includes, etc.
100 '<(DEPTH)/skia/config',
104 '-landroid', # ANativeWindow
105 '-ljnigraphics', # NDK access to bitmap
109 ['safe_browsing!=0', {
111 '<(chrome_native_sources_dir)/spdy_proxy_resource_throttle.cc',
112 '<(chrome_native_sources_dir)/spdy_proxy_resource_throttle.h',
118 # GN: //chrome/android:staging_jni_headers
119 'target_name': 'staging_jni_headers',
122 '<@(chrome_staging_jni_files)',
125 'jni_gen_package': 'staging/android',
127 'includes': [ '../../build/jni_generator.gypi' ],
130 # GN: //chrome/android:chrome_staging_java
131 'target_name': 'chrome_staging_java',
134 'java_in_dir': '<(chrome_java_dir)',
135 'R_package': 'com.google.android.apps.chrome',
136 'R_package_relpath': 'com/google/android/apps/chrome',
137 'has_java_resources': 1,
138 'res_channel_dir': '<(chrome_java_dir)/res_default',
139 'res_extra_dirs': ['<(res_channel_dir)'],
140 'res_extra_files': ['<!@(find <(res_channel_dir) -type f)'],
143 'chrome_template_resources',
144 'hosted_service_aidl',
145 '<(DEPTH)/base/base.gyp:base_java',
146 '<(DEPTH)/chrome/chrome.gyp:chrome_java',
147 '<(DEPTH)/chrome/chrome.gyp:document_tab_model_info_proto_java',
148 '<(DEPTH)/components/components.gyp:app_restrictions_resources',
149 '<(DEPTH)/components/components.gyp:navigation_interception_java',
150 '<(DEPTH)/components/components.gyp:service_tab_launcher',
151 '<(DEPTH)/components/components.gyp:web_contents_delegate_android_java',
152 '<(DEPTH)/content/content.gyp:content_java',
153 '<(DEPTH)/media/media.gyp:media_java',
154 '<(DEPTH)/net/net.gyp:net_java',
155 '<(DEPTH)/third_party/android_protobuf/android_protobuf.gyp:protobuf_nano_javalib',
156 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
157 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
158 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v7_mediarouter_javalib',
159 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v7_recyclerview_javalib',
160 '<(DEPTH)/third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_javalib',
161 '<(DEPTH)/third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
162 '<(DEPTH)/ui/android/ui_android.gyp:ui_java',
165 ['configuration_policy != 1', {
167 '<(DEPTH)/components/components.gyp:app_restrictions_resources',
171 'includes': [ '../../build/java.gypi' ],
174 # GN: //chrome/test/android:chrome_staging_test_support_java
175 'target_name': 'chrome_staging_test_support_java',
178 'java_in_dir': '<(chrome_java_test_support_dir)',
181 'chrome_staging_java',
182 '<(DEPTH)/base/base.gyp:base_java',
183 '<(DEPTH)/base/base.gyp:base_java_test_support',
184 '<(DEPTH)/chrome/chrome.gyp:chrome_java',
185 '<(DEPTH)/chrome/chrome.gyp:chrome_java_test_support',
186 '<(DEPTH)/content/content_shell_and_tests.gyp:content_java_test_support',
187 '<(DEPTH)/net/net.gyp:net_java',
188 '<(DEPTH)/net/net.gyp:net_java_test_support',
189 '<(DEPTH)/sync/sync.gyp:sync_java_test_support',
191 'includes': [ '../../build/java.gypi' ],
194 'target_name': 'chrome_template_resources',
197 'jinja_inputs_base_dir': '<(chrome_java_dir)/res_template',
199 '<(jinja_inputs_base_dir)/xml/searchable.xml',
200 '<(jinja_inputs_base_dir)/xml/syncadapter.xml',
202 'jinja_outputs_zip': '<(PRODUCT_DIR)/res.java/<(_target_name).zip',
204 'manifest_package=<(manifest_package)',
207 'all_dependent_settings': {
209 'additional_input_paths': ['<(jinja_outputs_zip)'],
210 'dependencies_res_zip_paths': ['<(jinja_outputs_zip)'],
213 'includes': [ '../../build/android/jinja_template.gypi' ],
216 'target_name': 'hosted_service_aidl',
219 'aidl_interface_file': '<(chrome_java_dir)/src/org/chromium/chrome/browser/hosted/common.aidl',
220 'aidl_import_include': '<(chrome_java_dir)/src/org/chromium/chrome/browser/hosted',
223 '<(chrome_java_dir)/src/org/chromium/chrome/browser/hosted/IBrowserConnectionCallback.aidl',
224 '<(chrome_java_dir)/src/org/chromium/chrome/browser/hosted/IBrowserConnectionService.aidl',
226 'includes': [ '../../build/java_aidl.gypi' ],
230 'target_name': 'libchrome_public',
231 'type': 'shared_library',
234 '<(DEPTH)/chrome/chrome.gyp:chrome_android_core',
240 '<@(chrome_public_app_native_sources)',
243 # Some android targets still depend on --gc-sections to link.
244 # TODO: remove --gc-sections for Debug builds (crbug.com/159847).
248 # TODO(yfriedman): move this DEP to chrome_android_core to be shared
249 # between internal/external.
252 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_dynamic',
255 # conditions for order_text_section
256 # Cygprofile methods need to be linked into the instrumented build.
257 ['order_profiling!=0', {
260 'dependencies': [ '<(DEPTH)/tools/cygprofile/cygprofile.gyp:cygprofile' ],
263 }], # order_profiling!=0
264 ['use_allocator!="none"', {
266 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
272 'target_name': 'chrome_public_manifest',
275 'jinja_inputs': ['<(chrome_java_dir)/AndroidManifest.xml'],
276 'jinja_output': '<(chrome_public_apk_manifest)',
278 'channel=<(android_channel)',
279 'configuration_policy=<(configuration_policy)',
280 'manifest_package=<(manifest_package)',
281 'min_sdk_version=16',
284 'includes': [ '../../build/android/jinja_template.gypi' ],
287 'target_name': 'chrome_public_apk',
290 'android_manifest_path': '<(chrome_public_apk_manifest)',
291 'apk_name': 'ChromePublic',
292 'native_lib_target': 'libchrome_public',
293 'java_in_dir': '<(chrome_java_dir)',
295 # Only attempt loading the library from the APK for 64 bit devices
296 # until the number of 32 bit devices which don't support this
297 # approach falls to a minimal level - http://crbug.com/390618.
298 ['component != "shared_library" and profiling==0 and (target_arch == "arm64" or target_arch == "x86_64")', {
299 'load_library_from_zip_file': '<(chrome_apk_load_library_from_zip)',
300 'load_library_from_zip': '<(chrome_apk_load_library_from_zip)',
305 'chrome_android_paks_copy',
306 'chrome_staging_java',
308 'includes': [ 'chrome_apk.gypi' ],
312 # chrome_public_apk creates a .jar as a side effect. Any java targets
313 # that need that .jar in their classpath should depend on this target,
314 'target_name': 'chrome_public_apk_java',
319 'includes': [ '../../build/apk_fake_jar.gypi' ],
322 # GN: //chrome/browser/android:chrome_staging_unittests
323 'target_name': 'chrome_staging_unittests',
324 'type': 'static_library',
326 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_delegate_unittest.cc',
327 '<(chrome_native_sources_dir)/history_report/delta_file_commons_unittest.cc',
328 '<(chrome_native_sources_dir)/history_report/delta_file_backend_leveldb_unittest.cc',
329 '<(chrome_native_sources_dir)/history_report/usage_reports_buffer_backend_unittest.cc',
330 '<(chrome_native_sources_dir)/policy/policy_manager_unittest.cc',
334 '<(DEPTH)/base/base.gyp:base_java',
335 '<(DEPTH)/chrome/chrome.gyp:chrome_java',
336 '<(DEPTH)/chrome/chrome.gyp:delta_file_proto',
337 '<(DEPTH)/chrome/chrome.gyp:test_support_unit',
338 '<(DEPTH)/net/net.gyp:net_test_support',
339 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
340 '<(DEPTH)/testing/gtest.gyp:gtest',
348 # This target is for sharing tests between both upstream and internal
349 # trees until sufficient test coverage is upstream.
350 'target_name': 'chrome_shared_test_java',
353 'java_in_dir': '<(chrome_java_tests_dir)',
356 'chrome_staging_java',
357 'chrome_staging_test_support_java',
358 '<(DEPTH)/base/base.gyp:base_java',
359 '<(DEPTH)/base/base.gyp:base_java_test_support',
360 '<(DEPTH)/chrome/chrome.gyp:chrome_java',
361 '<(DEPTH)/chrome/chrome.gyp:chrome_java_test_support',
362 '<(DEPTH)/components/components.gyp:web_contents_delegate_android_java',
363 '<(DEPTH)/content/content_shell_and_tests.gyp:content_java_test_support',
364 '<(DEPTH)/net/net.gyp:net_java',
365 '<(DEPTH)/net/net.gyp:net_java_test_support',
366 '<(DEPTH)/sync/sync.gyp:sync_java_test_support',
367 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
369 'includes': [ '../../build/java.gypi' ],
372 # GN: None. This will most likely be merged with chrome_shell before GN is
374 'target_name': 'chrome_public_test_apk_manifest',
377 'jinja_inputs': ['<(chrome_java_tests_dir)/AndroidManifest.xml'],
378 'jinja_output': '<(chrome_public_test_apk_manifest)',
380 'manifest_package=<(manifest_package)',
383 'includes': [ '../../build/android/jinja_template.gypi' ],
386 # GN: None. This will most likely be merged with chrome_shell before GN is
388 'target_name': 'chrome_public_test_apk',
391 'chrome_shared_test_java',
392 'chrome_public_apk_java',
395 'android_manifest_path': '<(chrome_public_test_apk_manifest)',
396 'package_name': 'chrome_public_test',
397 'java_in_dir': '<(chrome_java_tests_dir)',
398 'java_in_dir_suffix': '/src_dummy',
399 'apk_name': 'ChromePublicTest',
402 'includes': [ '../../build/java_apk.gypi' ],
409 # indent-tabs-mode:nil
411 # vim: set expandtab tabstop=2 shiftwidth=2: