Add P2PDatagramSocket and P2PStreamSocket interfaces.
[chromium-blink-merge.git] / chrome / android / chrome_apk.gyp
blobf5871c1e5a5df66793f7df3b25d8015e46fdace9
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=22',
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         'conditions': [
131           # Only attempt loading the library from the APK for 64 bit devices
132           # until the number of 32 bit devices which don't support this
133           # approach falls to a minimal level -  http://crbug.com/390618.
134           ['component != "shared_library" and profiling==0 and (target_arch == "arm64" or target_arch == "x86_64")', {
135             'load_library_from_zip_file': '<(chrome_apk_load_library_from_zip)',
136             'load_library_from_zip': '<(chrome_apk_load_library_from_zip)',
137           }],
138         ],
139       },
140       'dependencies': [
141         'chrome_android_paks_copy',
142         'chrome_public_template_resources',
143         '../chrome.gyp:chrome_java',
144       ],
145       'includes': [ 'chrome_apk.gypi' ],
146     },
147     {
148       # GN: N/A
149       # chrome_public_apk creates a .jar as a side effect. Any java targets
150       # that need that .jar in their classpath should depend on this target,
151       'target_name': 'chrome_public_apk_java',
152       'type': 'none',
153       'dependencies': [
154         'chrome_public_apk',
155       ],
156       'includes': [ '../../build/apk_fake_jar.gypi' ],
157     },
158     {
159       # GN: //chrome/android:chrome_shared_test_java
160       # This target is for sharing tests between both upstream and internal
161       # trees until sufficient test coverage is upstream.
162       'target_name': 'chrome_shared_test_java',
163       'type': 'none',
164       'variables': {
165         'java_in_dir': 'javatests',
166       },
167       'dependencies': [
168         '../../base/base.gyp:base_java',
169         '../../base/base.gyp:base_java_test_support',
170         '../../chrome/chrome.gyp:chrome_java',
171         '../../chrome/chrome.gyp:chrome_java_test_support',
172         '../../components/components.gyp:invalidation_javatests',
173         '../../components/components.gyp:precache_javatests',
174         '../../components/components.gyp:web_contents_delegate_android_java',
175         '../../content/content_shell_and_tests.gyp:content_java_test_support',
176         '../../net/net.gyp:net_java',
177         '../../net/net.gyp:net_java_test_support',
178         '../../sync/sync.gyp:sync_java_test_support',
179         '../../sync/sync.gyp:sync_javatests',
180         '../../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
181         '../../ui/android/ui_android.gyp:ui_javatests',
182       ],
183       'includes': [ '../../build/java.gypi' ],
184     },
185     {
186       # GN: //chrome/android:chrome_public_test_apk_manifest
187       'target_name': 'chrome_public_test_apk_manifest',
188       'type': 'none',
189       'variables': {
190         'jinja_inputs': ['javatests/AndroidManifest.xml'],
191         'jinja_output': '<(chrome_public_test_apk_manifest)',
192         'jinja_variables': [
193           'manifest_package=<(manifest_package)',
194         ],
195       },
196       'includes': [ '../../build/android/jinja_template.gypi' ],
197     },
198     {
199       # GN: //chrome/android:chrome_public_test_apk
200       'target_name': 'chrome_public_test_apk',
201       'type': 'none',
202       'dependencies': [
203         'chrome_shared_test_java',
204         'chrome_public_apk_java',
205         '../../testing/android/on_device_instrumentation.gyp:broker_java',
206         '../../testing/android/on_device_instrumentation.gyp:require_driver_apk',
207       ],
208       'variables': {
209         'android_manifest_path': '<(chrome_public_test_apk_manifest)',
210         'package_name': 'chrome_public_test',
211         'java_in_dir': 'javatests',
212         'java_in_dir_suffix': '/src_dummy',
213         'apk_name': 'ChromePublicTest',
214         'is_test_apk': 1,
215         'test_type': 'instrumentation',
216         'isolate_file': '../chrome_public_test_apk.isolate',
217       },
218       'includes': [
219         '../../build/java_apk.gypi',
220         '../../build/android/test_runner.gypi',
221       ],
222     },
223   ],
226 # Local Variables:
227 # tab-width:2
228 # indent-tabs-mode:nil
229 # End:
230 # vim: set expandtab tabstop=2 shiftwidth=2: