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/historyreport/HistoryReportJniBridge.java',
32 '<(chrome_java_dir)/src/org/chromium/chrome/browser/policy/PolicyManager.java',
33 '<(chrome_java_dir)/src/org/chromium/chrome/browser/rlz/RevenueStats.java',
34 '<(chrome_java_dir)/src/org/chromium/chrome/browser/tab/BackgroundContentViewHelper.java',
35 '<(chrome_java_dir)/src/org/chromium/chrome/browser/tab/ThumbnailTabHelper.java',
37 # This list is shared with GN.
38 'chrome_staging_native_sources': [
39 '<(chrome_native_sources_dir)/bookmark/edit_bookmark_helper.cc',
40 '<(chrome_native_sources_dir)/bookmark/edit_bookmark_helper.h',
41 '<(chrome_native_sources_dir)/chrome_main_delegate_staging_android.cc',
42 '<(chrome_native_sources_dir)/chrome_main_delegate_staging_android.h',
43 '<(chrome_native_sources_dir)/compositor/compositor_view.cc',
44 '<(chrome_native_sources_dir)/compositor/compositor_view.h',
45 '<(chrome_native_sources_dir)/compositor/layer/reader_mode_layer.cc',
46 '<(chrome_native_sources_dir)/compositor/layer/reader_mode_layer.h',
47 '<(chrome_native_sources_dir)/compositor/layer/tab_handle_layer.cc',
48 '<(chrome_native_sources_dir)/compositor/layer/tab_handle_layer.h',
49 '<(chrome_native_sources_dir)/compositor/scene_layer/contextual_search_scene_layer.cc',
50 '<(chrome_native_sources_dir)/compositor/scene_layer/contextual_search_scene_layer.h',
51 '<(chrome_native_sources_dir)/compositor/scene_layer/reader_mode_scene_layer.cc',
52 '<(chrome_native_sources_dir)/compositor/scene_layer/reader_mode_scene_layer.h',
53 '<(chrome_native_sources_dir)/compositor/scene_layer/tab_list_scene_layer.cc',
54 '<(chrome_native_sources_dir)/compositor/scene_layer/tab_list_scene_layer.h',
55 '<(chrome_native_sources_dir)/compositor/scene_layer/tab_strip_scene_layer.cc',
56 '<(chrome_native_sources_dir)/compositor/scene_layer/tab_strip_scene_layer.h',
57 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_context.cc',
58 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_context.h',
59 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_delegate.cc',
60 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_delegate.h',
61 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_manager.cc',
62 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_manager.h',
63 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_tab_helper.cc',
64 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_tab_helper.h',
65 '<(chrome_native_sources_dir)/document/document_web_contents_delegate.cc',
66 '<(chrome_native_sources_dir)/history_report/data_observer.cc',
67 '<(chrome_native_sources_dir)/history_report/data_observer.h',
68 '<(chrome_native_sources_dir)/history_report/data_provider.cc',
69 '<(chrome_native_sources_dir)/history_report/data_provider.h',
70 '<(chrome_native_sources_dir)/history_report/delta_file_backend_leveldb.cc',
71 '<(chrome_native_sources_dir)/history_report/delta_file_backend_leveldb.h',
72 '<(chrome_native_sources_dir)/history_report/delta_file_commons.cc',
73 '<(chrome_native_sources_dir)/history_report/delta_file_commons.h',
74 '<(chrome_native_sources_dir)/history_report/delta_file_service.cc',
75 '<(chrome_native_sources_dir)/history_report/delta_file_service.h',
76 '<(chrome_native_sources_dir)/history_report/get_all_urls_from_history_task.cc',
77 '<(chrome_native_sources_dir)/history_report/get_all_urls_from_hisotry_task.h',
78 '<(chrome_native_sources_dir)/history_report/historic_visits_migration_task.cc',
79 '<(chrome_native_sources_dir)/history_report/historic_visits_migration_task.h',
80 '<(chrome_native_sources_dir)/history_report/history_report_jni_bridge.cc',
81 '<(chrome_native_sources_dir)/history_report/history_report_jni_bridge.h',
82 '<(chrome_native_sources_dir)/history_report/usage_report_util.cc',
83 '<(chrome_native_sources_dir)/history_report/usage_report_util.h',
84 '<(chrome_native_sources_dir)/history_report/usage_reports_buffer_backend.cc',
85 '<(chrome_native_sources_dir)/history_report/usage_reports_buffer_backend.h',
86 '<(chrome_native_sources_dir)/history_report/usage_reports_buffer_service.cc',
87 '<(chrome_native_sources_dir)/history_report/usage_reports_buffer_service.h',
88 '<(chrome_native_sources_dir)/policy/policy_manager.cc',
89 '<(chrome_native_sources_dir)/policy/policy_manager.h',
90 '<(chrome_native_sources_dir)/proto/client_discourse_context.proto',
91 '<(chrome_native_sources_dir)/proto/delta_file.proto',
92 '<(chrome_native_sources_dir)/rlz/revenue_stats.cc',
93 '<(chrome_native_sources_dir)/rlz/revenue_stats.h',
94 '<(chrome_native_sources_dir)/staging_jni_registrar.cc',
95 '<(chrome_native_sources_dir)/staging_jni_registrar.h',
96 '<(chrome_native_sources_dir)/tab/background_content_view_helper.cc',
97 '<(chrome_native_sources_dir)/tab/background_content_view_helper.h',
98 '<(chrome_native_sources_dir)/tab/thumbnail_tab_helper_android.cc',
99 '<(chrome_native_sources_dir)/tab/thumbnail_tab_helper_android.h',
101 # This list is shared with GN.
102 # Defines a list of source files should be present in the open-source
103 # chrome-apk but not in the published static_library which is included in the
104 # real chrome for android.
105 'chrome_public_app_native_sources': [
106 '<(chrome_native_sources_dir)/chrome_entry_point.cc',
107 '<(chrome_native_sources_dir)/chrome_main_delegate_staging_android_initializer.cc',
108 '<(chrome_native_sources_dir)/chrome_staging_jni_onload.cc',
109 '<(chrome_native_sources_dir)/chrome_staging_jni_onload.h',
114 # GN: //chrome/browser/android:chrome_staging
115 'target_name': 'libchrome_staging',
116 'type': 'static_library',
118 'staging_jni_headers',
119 '<(DEPTH)/chrome/chrome.gyp:browser',
120 '<(DEPTH)/components/components.gyp:component_metrics_proto',
121 '<(DEPTH)/skia/skia.gyp:skia',
122 '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
125 '<@(chrome_staging_native_sources)',
129 '<(SHARED_INTERMEDIATE_DIR)/staging/android',
130 '<(android_ndk_include)', # For native_window.h, GL includes, etc.
131 '<(DEPTH)/skia/config',
135 '-landroid', # ANativeWindow
136 '-ljnigraphics', # NDK access to bitmap
140 ['safe_browsing!=0', {
142 '<(chrome_native_sources_dir)/spdy_proxy_resource_throttle.cc',
143 '<(chrome_native_sources_dir)/spdy_proxy_resource_throttle.h',
148 'proto_in_dir': '<(chrome_native_sources_dir)/proto',
149 'proto_out_dir': 'chrome/browser/android/proto',
151 'includes': [ '../../build/protoc.gypi', ],
154 # GN: //chrome/android:staging_jni_headers
155 'target_name': 'staging_jni_headers',
158 '<@(chrome_staging_jni_files)',
161 'jni_gen_package': 'staging/android',
163 'includes': [ '../../build/jni_generator.gypi' ],
166 # GN: //chrome/android:chrome_staging_java
167 'target_name': 'chrome_staging_java',
170 'java_in_dir': '<(chrome_java_dir)',
171 'R_package': 'com.google.android.apps.chrome',
172 'R_package_relpath': 'com/google/android/apps/chrome',
173 'has_java_resources': 1,
174 'res_channel_dir': '<(chrome_java_dir)/res_default',
175 'res_extra_dirs': ['<(res_channel_dir)'],
176 'res_extra_files': ['<!@(find <(res_channel_dir) -type f)'],
179 # Listed first to ensure that it overrides public strings.
180 'chrome_staging_strings_grd',
181 'chrome_template_resources',
182 'hosted_service_aidl',
183 '<(DEPTH)/base/base.gyp:base_java',
184 '<(DEPTH)/chrome/chrome.gyp:chrome_java',
185 '<(DEPTH)/chrome/chrome.gyp:document_tab_model_info_proto_java',
186 '<(DEPTH)/components/components.gyp:app_restrictions_resources',
187 '<(DEPTH)/components/components.gyp:navigation_interception_java',
188 '<(DEPTH)/components/components.gyp:service_tab_launcher',
189 '<(DEPTH)/components/components.gyp:web_contents_delegate_android_java',
190 '<(DEPTH)/content/content.gyp:content_java',
191 '<(DEPTH)/media/media.gyp:media_java',
192 '<(DEPTH)/net/net.gyp:net_java',
193 '<(DEPTH)/third_party/android_protobuf/android_protobuf.gyp:protobuf_nano_javalib',
194 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
195 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
196 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v7_mediarouter_javalib',
197 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v7_recyclerview_javalib',
198 '<(DEPTH)/third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_javalib',
199 '<(DEPTH)/third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
200 '<(DEPTH)/ui/android/ui_android.gyp:ui_java',
203 ['configuration_policy != 1', {
205 '<(DEPTH)/components/components.gyp:app_restrictions_resources',
209 'includes': [ '../../build/java.gypi' ],
212 'target_name': 'chrome_staging_strings_grd',
215 'grd_file': '<(chrome_java_dir)/strings/android_strings.grd',
217 'includes': [ '../../build/java_strings_grd.gypi' ],
220 # GN: //chrome/android:chrome_staging_test_support_java
221 'target_name': 'chrome_staging_test_support_java',
224 'java_in_dir': '<(chrome_java_test_support_dir)',
227 'chrome_staging_java',
228 '<(DEPTH)/base/base.gyp:base_java',
229 '<(DEPTH)/base/base.gyp:base_java_test_support',
230 '<(DEPTH)/chrome/chrome.gyp:chrome_java',
231 '<(DEPTH)/chrome/chrome.gyp:chrome_java_test_support',
232 '<(DEPTH)/content/content_shell_and_tests.gyp:content_java_test_support',
233 '<(DEPTH)/net/net.gyp:net_java',
234 '<(DEPTH)/net/net.gyp:net_java_test_support',
235 '<(DEPTH)/sync/sync.gyp:sync_java_test_support',
237 'includes': [ '../../build/java.gypi' ],
240 'target_name': 'chrome_template_resources',
243 'jinja_inputs_base_dir': '<(chrome_java_dir)/res_template',
245 '<(jinja_inputs_base_dir)/xml/searchable.xml',
246 '<(jinja_inputs_base_dir)/xml/syncadapter.xml',
248 'jinja_outputs_zip': '<(PRODUCT_DIR)/res.java/<(_target_name).zip',
250 'manifest_package=<(manifest_package)',
253 'all_dependent_settings': {
255 'additional_input_paths': ['<(jinja_outputs_zip)'],
256 'dependencies_res_zip_paths': ['<(jinja_outputs_zip)'],
259 'includes': [ '../../build/android/jinja_template.gypi' ],
262 'target_name': 'hosted_service_aidl',
265 'aidl_interface_file': '<(chrome_java_dir)/src/org/chromium/chrome/browser/hosted/common.aidl',
266 'aidl_import_include': '<(chrome_java_dir)/src/org/chromium/chrome/browser/hosted',
269 '<(chrome_java_dir)/src/org/chromium/chrome/browser/hosted/IBrowserConnectionCallback.aidl',
270 '<(chrome_java_dir)/src/org/chromium/chrome/browser/hosted/IBrowserConnectionService.aidl',
272 'includes': [ '../../build/java_aidl.gypi' ],
276 'target_name': 'libchrome_public',
277 'type': 'shared_library',
280 '<(DEPTH)/chrome/chrome.gyp:chrome_android_core',
286 '<@(chrome_public_app_native_sources)',
289 # Some android targets still depend on --gc-sections to link.
290 # TODO: remove --gc-sections for Debug builds (crbug.com/159847).
294 # TODO(yfriedman): move this DEP to chrome_android_core to be shared
295 # between internal/external.
298 '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_dynamic',
301 # conditions for order_text_section
302 # Cygprofile methods need to be linked into the instrumented build.
303 ['order_profiling!=0', {
306 'dependencies': [ '<(DEPTH)/tools/cygprofile/cygprofile.gyp:cygprofile' ],
309 }], # order_profiling!=0
310 ['use_allocator!="none"', {
312 '<(DEPTH)/base/allocator/allocator.gyp:allocator',
318 'target_name': 'chrome_public_manifest',
321 'jinja_inputs': ['<(chrome_java_dir)/AndroidManifest.xml'],
322 'jinja_output': '<(chrome_public_apk_manifest)',
324 'channel=<(android_channel)',
325 'configuration_policy=<(configuration_policy)',
326 'manifest_package=<(manifest_package)',
327 'min_sdk_version=16',
330 'includes': [ '../../build/android/jinja_template.gypi' ],
333 'target_name': 'chrome_public_apk',
336 'android_manifest_path': '<(chrome_public_apk_manifest)',
337 'apk_name': 'ChromePublic',
338 'native_lib_target': 'libchrome_public',
339 'java_in_dir': '<(chrome_java_dir)',
341 # Only attempt loading the library from the APK for 64 bit devices
342 # until the number of 32 bit devices which don't support this
343 # approach falls to a minimal level - http://crbug.com/390618.
344 ['component != "shared_library" and profiling==0 and (target_arch == "arm64" or target_arch == "x86_64")', {
345 'load_library_from_zip_file': '<(chrome_apk_load_library_from_zip)',
346 'load_library_from_zip': '<(chrome_apk_load_library_from_zip)',
351 'chrome_android_paks_copy',
352 'chrome_staging_java',
354 'includes': [ 'chrome_apk.gypi' ],
358 # chrome_public_apk creates a .jar as a side effect. Any java targets
359 # that need that .jar in their classpath should depend on this target,
360 'target_name': 'chrome_public_apk_java',
365 'includes': [ '../../build/apk_fake_jar.gypi' ],
368 # GN: //chrome/browser/android:chrome_staging_unittests
369 'target_name': 'chrome_staging_unittests',
370 'type': 'static_library',
372 '<(chrome_native_sources_dir)/contextualsearch/contextual_search_delegate_unittest.cc',
373 '<(chrome_native_sources_dir)/history_report/delta_file_commons_unittest.cc',
374 '<(chrome_native_sources_dir)/history_report/delta_file_backend_leveldb_unittest.cc',
375 '<(chrome_native_sources_dir)/history_report/usage_reports_buffer_backend_unittest.cc',
376 '<(chrome_native_sources_dir)/policy/policy_manager_unittest.cc',
380 '<(DEPTH)/base/base.gyp:base_java',
381 '<(DEPTH)/chrome/chrome.gyp:chrome_java',
382 '<(DEPTH)/chrome/chrome.gyp:test_support_unit',
383 '<(DEPTH)/net/net.gyp:net_test_support',
384 '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
385 '<(DEPTH)/testing/gtest.gyp:gtest',
393 # This target is for sharing tests between both upstream and internal
394 # trees until sufficient test coverage is upstream.
395 'target_name': 'chrome_shared_test_java',
398 'java_in_dir': '<(chrome_java_tests_dir)',
401 'chrome_staging_java',
402 'chrome_staging_test_support_java',
403 '<(DEPTH)/base/base.gyp:base_java',
404 '<(DEPTH)/base/base.gyp:base_java_test_support',
405 '<(DEPTH)/chrome/chrome.gyp:chrome_java',
406 '<(DEPTH)/chrome/chrome.gyp:chrome_java_test_support',
407 '<(DEPTH)/components/components.gyp:web_contents_delegate_android_java',
408 '<(DEPTH)/content/content_shell_and_tests.gyp:content_java_test_support',
409 '<(DEPTH)/net/net.gyp:net_java',
410 '<(DEPTH)/net/net.gyp:net_java_test_support',
411 '<(DEPTH)/sync/sync.gyp:sync_java_test_support',
412 '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
414 'includes': [ '../../build/java.gypi' ],
417 # GN: None. This will most likely be merged with chrome_shell before GN is
419 'target_name': 'chrome_public_test_apk_manifest',
422 'jinja_inputs': ['<(chrome_java_tests_dir)/AndroidManifest.xml'],
423 'jinja_output': '<(chrome_public_test_apk_manifest)',
425 'manifest_package=<(manifest_package)',
428 'includes': [ '../../build/android/jinja_template.gypi' ],
431 # GN: None. This will most likely be merged with chrome_shell before GN is
433 'target_name': 'chrome_public_test_apk',
436 'chrome_shared_test_java',
437 'chrome_public_apk_java',
440 'android_manifest_path': '<(chrome_public_test_apk_manifest)',
441 'package_name': 'chrome_public_test',
442 'java_in_dir': '<(chrome_java_tests_dir)',
443 'java_in_dir_suffix': '/src_dummy',
444 'apk_name': 'ChromePublicTest',
447 'includes': [ '../../build/java_apk.gypi' ],
454 # indent-tabs-mode:nil
456 # vim: set expandtab tabstop=2 shiftwidth=2: