Revert of Remove deprecated methods from Pickle. (patchset #10 id:180001 of https...
[chromium-blink-merge.git] / chrome / chrome_shell.gypi
blob83bbb9592c1a3e1d5574b20f921828ea535d9a5c
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 # This GYPI allows independent customization of the chrome shell in a manner
6 # similar to content shell (in content_shell.gypi). Notably, this file does
7 # NOT contain chrome_android_core, which is independent of the chrome shell
8 # and should be separately customized.
10   'variables': {
11     'package_name': 'chrome_shell_apk',
12   },
13   'targets': [
14     {
15       # GN: //chrome/android:chrome_shell_base
16       'target_name': 'libchromeshell_base',
17       'type': 'static_library',
18       'dependencies': [
19         '../base/base.gyp:base',
20         'chrome_android_core',
21         'chrome.gyp:browser_ui',
22         '../content/content.gyp:content_app_browser',
23       ],
24       'sources': [
25         'android/shell/chrome_shell_google_location_settings_helper.cc',
26         'android/shell/chrome_shell_google_location_settings_helper.h',
27       ],
28       'include_dirs': [
29         '../skia/config',
30       ],
31       'conditions': [
32         [ 'order_profiling!=0', {
33           'conditions': [
34             [ 'OS=="android"', {
35               'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
36             }],
37           ],
38         }],
39         [ 'use_allocator!="none"', {
40           'dependencies': [
41             '../base/allocator/allocator.gyp:allocator', ],
42         }],
43         [ 'cld_version==0 or cld_version==2', {
44           'dependencies': [
45             # Chrome shell should always use the statically-linked CLD data.
46             '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_static', ],
47         }],
48         ['OS=="android"', {
49           'direct_dependent_settings': {
50             'ldflags': [
51               # Some android targets still depend on --gc-sections to link.
52               # TODO: remove --gc-sections for Debug builds (crbug.com/159847).
53               '-Wl,--gc-sections',
54             ],
55           },
56         }],
57       ],
58     },
59     {
60       # GN: //chrome/android:chrome_shell
61       'target_name': 'libchromeshell',
62       'type': 'shared_library',
63       'sources': [
64         # This file must always be included in the shared_library step to ensure
65         # JNI_OnLoad is exported.
66         'app/android/chrome_jni_onload.cc',
67         'android/shell/chrome_main_delegate_chrome_shell_android.cc',
68         'android/shell/chrome_main_delegate_chrome_shell_android.h',
69       ],
70       'dependencies': [
71         'libchromeshell_base',
72       ],
73       'includes': [
74         # File 'protection' is based on non-trivial linker magic. TODO(pasko):
75         # remove it when crbug.com/424562 is fixed.
76         '../base/files/protect_file_posix.gypi',
77       ],
78     },
79     {
80       # GN: //chrome/android:chrome_sync_shell
81       'target_name': 'libchromesyncshell',
82       'type': 'shared_library',
83       'sources': [
84         # This file must always be included in the shared_library step to ensure
85         # JNI_OnLoad is exported.
86         'app/android/chrome_jni_onload.cc',
87         'android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc',
88         'android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.h',
89       ],
90       'dependencies': [
91         'libchromeshell_base',
92         '../sync/sync.gyp:test_support_sync_fake_server_android',
93       ],
94     },
95     {
96       # GN: //chrome/android:chrome_shell_manifest
97       'target_name': 'chrome_shell_manifest',
98       'type': 'none',
99       'variables': {
100         'jinja_inputs': ['android/shell/java/AndroidManifest.xml.jinja2'],
101         'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/chrome_shell_manifest/AndroidManifest.xml',
102       },
103       'includes': [ '../build/android/jinja_template.gypi' ],
104     },
105     {
106       # GN: //chrome/android:chrome_shell_apk
107       'target_name': 'chrome_shell_apk',
108       'type': 'none',
109       'dependencies': [
110         'chrome_java',
111         'chrome_shell_paks',
112         'libchromeshell',
113         '../media/media.gyp:media_java',
114       ],
115       'variables': {
116         'apk_name': 'ChromeShell',
117         'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/chrome_shell_manifest/AndroidManifest.xml',
118         'native_lib_version_name': '<(version_full)',
119         'java_in_dir': 'android/shell/java',
120         'resource_dir': 'android/shell/res',
121         'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)',
122         'native_lib_target': 'libchromeshell',
123         'additional_input_paths': [
124           '<@(chrome_android_pak_output_resources)',
125         ],
126       },
127       'includes': [ '../build/java_apk.gypi', ],
128     },
129     {
130       # GN: N/A
131       # chrome_shell_apk creates a .jar as a side effect. Any java targets
132       # that need that .jar in their classpath should depend on this target,
133       # chrome_shell_apk_java. Dependents of chrome_shell_apk receive its
134       # jar path in the variable 'apk_output_jar_path'.
135       # This target should only be used by targets which instrument
136       # chrome_shell_apk.
137       'target_name': 'chrome_shell_apk_java',
138       'type': 'none',
139       'dependencies': [
140         'chrome_shell_apk',
141       ],
142       'includes': [ '../build/apk_fake_jar.gypi' ],
143     },
144     {
145       'target_name': 'chrome_shell_paks',
146       'type': 'none',
147       'dependencies': [
148         '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
149         '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
150       ],
151       'copies': [
152         {
153           'destination': '<(chrome_android_pak_output_folder)',
154           'files': [
155             '<@(chrome_android_pak_input_resources)',
156           ],
157         }
158       ],
159     },
160     {
161       # GN: //chrome/android:chrome_sync_shell_manifest
162       'target_name': 'chrome_sync_shell_manifest',
163       'type': 'none',
164       'variables': {
165         'jinja_inputs': ['android/sync_shell/java/AndroidManifest.xml.jinja2'],
166         'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/chrome_sync_shell_manifest/AndroidManifest.xml',
167       },
168       'includes': [ '../build/android/jinja_template.gypi' ],
169     },
170     {
171       # GN: //chrome/android:chrome_sync_shell_apk
172       'target_name': 'chrome_sync_shell_apk',
173       'type': 'none',
174       'dependencies': [
175         'chrome_java',
176         'chrome_shell_paks',
177         'libchromesyncshell',
178         '../media/media.gyp:media_java',
179         '../sync/sync.gyp:sync_java_test_support',
180       ],
181       'variables': {
182         'apk_name': 'ChromeSyncShell',
183         'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/chrome_sync_shell_manifest/AndroidManifest.xml',
184         'R_package': 'org.chromium.chrome.shell',
185         'native_lib_version_name': '<(version_full)',
186         'java_in_dir': 'android/shell/java',
187         'resource_dir': 'android/shell/res',
188         'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)',
189         'native_lib_target': 'libchromesyncshell',
190         'additional_input_paths': [
191           '<@(chrome_android_pak_output_resources)',
192         ],
193       },
194       'includes': [ '../build/java_apk.gypi', ],
195     },
196     {
197       # GN: N/A
198       # chrome_sync_shell_apk creates a .jar as a side effect. Any java
199       # targets that need that .jar in their classpath should depend on this
200       # target. Dependents of chrome_sync_shell_apk receive its jar path in the
201       # variable 'apk_output_jar_path'. This target should only be used by
202       # targets which instrument chrome_sync_shell_apk.
203       'target_name': 'chrome_sync_shell_apk_java',
204       'type': 'none',
205       'dependencies': [
206         'chrome_sync_shell_apk',
207       ],
208       'includes': [ '../build/apk_fake_jar.gypi' ],
209     },
210   ],