Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / chrome / android / chrome_apk.gyp
blobcb910ecf3d96cbcbab71e91dbcfedf20277ee1cc
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.
5   'includes': [
6     '../../chrome/chrome_android_paks.gypi', # Included for the list of pak resources.
7     '../../build/util/version.gypi'
8    ],
9   'variables': {
10     'chromium_code': 1,
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',
15     # This list is shared with GN.
16     # Defines a list of source files should be present in the open-source
17     # chrome-apk but not in the published static_library which is included in the
18     # real chrome for android.
19     'chrome_public_app_native_sources': [
20       '../browser/android/chrome_entry_point.cc',
21       '../browser/android/chrome_main_delegate_staging_android_initializer.cc',
22     ],
23   },
24   'targets': [
25     {
26       #GN: //chrome/android::custom_tabs_service_aidl
27       'target_name': 'custom_tabs_service_aidl',
28       'type': 'none',
29       'variables': {
30         'aidl_interface_file': 'java/src/android/support/customtabs/common.aidl',
31         'aidl_import_include': 'java/src/android/support/customtabs',
32       },
33       'sources': [
34         'java/src/android/support/customtabs/ICustomTabsCallback.aidl',
35         'java/src/android/support/customtabs/ICustomTabsService.aidl',
36       ],
37       'includes': [ '../../build/java_aidl.gypi' ],
38     },
39     {
40       # GN: //chrome/android:chrome_public_template_resources
41       'target_name': 'chrome_public_template_resources',
42       'type': 'none',
43       'variables': {
44         'jinja_inputs_base_dir': 'java/res_template',
45         'jinja_inputs': [
46           '<(jinja_inputs_base_dir)/xml/searchable.xml',
47           '<(jinja_inputs_base_dir)/xml/syncadapter.xml',
48         ],
49         'jinja_outputs_zip': '<(PRODUCT_DIR)/res.java/<(_target_name).zip',
50         'jinja_variables': [
51           'manifest_package=<(manifest_package)',
52         ],
53       },
54       'all_dependent_settings': {
55         'variables': {
56           'additional_input_paths': ['<(jinja_outputs_zip)'],
57           'dependencies_res_zip_paths': ['<(jinja_outputs_zip)'],
58         },
59       },
60       'includes': [ '../../build/android/jinja_template.gypi' ],
61     },
62     {
63       # GN: //chrome/android:chrome_public
64       'target_name': 'libchrome_public',
65       'type': 'shared_library',
66       'dependencies': [
67         '../../chrome/chrome.gyp:chrome_android_core',
68       ],
69       'include_dirs': [
70         '../..',
71       ],
72       'sources': [
73         '<@(chrome_public_app_native_sources)',
74       ],
75       'ldflags': [
76         # Some android targets still depend on --gc-sections to link.
77         # TODO: remove --gc-sections for Debug builds (crbug.com/159847).
78         '-Wl,--gc-sections',
79       ],
80       'conditions': [
81         # TODO(yfriedman): move this DEP to chrome_android_core to be shared
82         # between internal/external.
83         ['cld_version==2', {
84           'dependencies': [
85             '../../third_party/cld_2/cld_2.gyp:cld2_dynamic',
86           ],
87         }],
88         # conditions for order_text_section
89         # Cygprofile methods need to be linked into the instrumented build.
90         ['order_profiling!=0', {
91           'conditions': [
92             ['OS=="android"', {
93               'dependencies': [ '../../tools/cygprofile/cygprofile.gyp:cygprofile' ],
94             }],
95           ],
96         }],  # order_profiling!=0
97         ['use_allocator!="none"', {
98           'dependencies': [
99             '../../base/allocator/allocator.gyp:allocator',
100           ],
101         }],
102       ],
103     },
104     {
105       # GN: //chrome/android:chrome_public_apk_manifest
106       'target_name': 'chrome_public_manifest',
107       'type': 'none',
108       'variables': {
109         'jinja_inputs': ['java/AndroidManifest.xml'],
110         'jinja_output': '<(chrome_public_apk_manifest)',
111         'jinja_variables': [
112           'channel=<(android_channel)',
113           'configuration_policy=<(configuration_policy)',
114           'manifest_package=<(manifest_package)',
115           'min_sdk_version=16',
116           'target_sdk_version=23',
117         ],
118       },
119       'includes': [ '../../build/android/jinja_template.gypi' ],
120     },
121     {
122       # GN: //chrome/android:chrome_public_apk
123       'target_name': 'chrome_public_apk',
124       'type': 'none',
125       'variables': {
126         'android_manifest_path': '<(chrome_public_apk_manifest)',
127         'apk_name': 'ChromePublic',
128         'native_lib_target': 'libchrome_public',
129         'java_in_dir': 'java',
130         'resource_dir': '../../chrome/android/java/res_chromium',
131         'conditions': [
132           # Only attempt loading the library from the APK for 64 bit devices
133           # until the number of 32 bit devices which don't support this
134           # approach falls to a minimal level -  http://crbug.com/390618.
135           ['component != "shared_library" and profiling==0 and (target_arch == "arm64" or target_arch == "x86_64")', {
136             'load_library_from_zip_file': '<(chrome_apk_load_library_from_zip)',
137             'load_library_from_zip': '<(chrome_apk_load_library_from_zip)',
138           }],
139         ],
140       },
141       'dependencies': [
142         'chrome_android_paks_copy',
143         'chrome_public_template_resources',
144         '../chrome.gyp:chrome_java',
145       ],
146       'includes': [ 'chrome_apk.gypi' ],
147     },
148     {
149       # GN: N/A
150       # chrome_public_apk creates a .jar as a side effect. Any java targets
151       # that need that .jar in their classpath should depend on this target,
152       'target_name': 'chrome_public_apk_java',
153       'type': 'none',
154       'dependencies': [
155         'chrome_public_apk',
156       ],
157       'includes': [ '../../build/apk_fake_jar.gypi' ],
158     },
159     {
160       # GN: //chrome/android:chrome_shared_test_java
161       # This target is for sharing tests between both upstream and internal
162       # trees until sufficient test coverage is upstream.
163       'target_name': 'chrome_shared_test_java',
164       'type': 'none',
165       'variables': {
166         'java_in_dir': 'javatests',
167       },
168       'dependencies': [
169         '../../base/base.gyp:base_java',
170         '../../base/base.gyp:base_java_test_support',
171         '../../chrome/chrome.gyp:chrome_java',
172         '../../chrome/chrome.gyp:chrome_java_test_support',
173         '../../components/components.gyp:invalidation_javatests',
174         '../../components/components.gyp:offline_pages_enums_java',
175         '../../components/components.gyp:precache_javatests',
176         '../../components/components.gyp:web_contents_delegate_android_java',
177         '../../content/content_shell_and_tests.gyp:content_java_test_support',
178         '../../net/net.gyp:net_java',
179         '../../net/net.gyp:net_java_test_support',
180         '../../sync/sync.gyp:sync_java_test_support',
181         '../../sync/sync.gyp:sync_javatests',
182         '../../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
183         '../../ui/android/ui_android.gyp:ui_javatests',
184       ],
185       'includes': [ '../../build/java.gypi' ],
186     },
187     {
188       # GN: //chrome/android:chrome_public_test_apk_manifest
189       'target_name': 'chrome_public_test_apk_manifest',
190       'type': 'none',
191       'variables': {
192         'jinja_inputs': ['javatests/AndroidManifest.xml'],
193         'jinja_output': '<(chrome_public_test_apk_manifest)',
194         'jinja_variables': [
195           'manifest_package=<(manifest_package)',
196         ],
197       },
198       'includes': [ '../../build/android/jinja_template.gypi' ],
199     },
200     {
201       # GN: //chrome/android:chrome_public_test_apk
202       'target_name': 'chrome_public_test_apk',
203       'type': 'none',
204       'dependencies': [
205         'chrome_shared_test_java',
206         'chrome_public_apk_java',
207         '../../testing/android/on_device_instrumentation.gyp:broker_java',
208         '../../testing/android/on_device_instrumentation.gyp:require_driver_apk',
209       ],
210       'variables': {
211         'android_manifest_path': '<(chrome_public_test_apk_manifest)',
212         'package_name': 'chrome_public_test',
213         'java_in_dir': 'javatests',
214         'java_in_dir_suffix': '/src_dummy',
215         'apk_name': 'ChromePublicTest',
216         'is_test_apk': 1,
217         'test_type': 'instrumentation',
218         'isolate_file': '../chrome_public_test_apk.isolate',
219       },
220       'includes': [
221         '../../build/java_apk.gypi',
222         '../../build/android/test_runner.gypi',
223       ],
224     },
225   ],
228 # Local Variables:
229 # tab-width:2
230 # indent-tabs-mode:nil
231 # End:
232 # vim: set expandtab tabstop=2 shiftwidth=2: