Changes layer reparenting to happen after a window parent is changed in aura::Window...
[chromium-blink-merge.git] / components / cronet.gypi
blob865f80348734b7dfdd9e5f8ec5d30ada3337091f
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.
6   'conditions': [
7     ['OS=="android"', {
8       # TODO(mef): Consider moving all Cronet Android targets into separate
9       # file. Also figure out what needs to be done for gn script.
10       'targets': [
11         {
12           'target_name': 'cronet_jni_headers',
13           'type': 'none',
14           'sources': [
15             'cronet/android/java/src/org/chromium/net/UrlRequest.java',
16             'cronet/android/java/src/org/chromium/net/UrlRequestContext.java',
17           ],
18           'variables': {
19             'jni_gen_package': 'cronet',
20             'jni_generator_ptr_type': 'long',
21           },
22           'includes': [ '../build/jni_generator.gypi' ],
23         },
24         {
25           'target_name': 'cronet_url_request_error_list',
26           'type': 'none',
27           'sources': [
28             'cronet/android/java/src/org/chromium/net/UrlRequestError.template',
29           ],
30           'variables': {
31             'package_name': 'org/chromium/cronet',
32             'template_deps': ['cronet/android/org_chromium_net_UrlRequest_error_list.h'],
33           },
34           'includes': [ '../build/android/java_cpp_template.gypi' ],
35         },
36         {
37           'target_name': 'cronet_url_request_priority_list',
38           'type': 'none',
39           'sources': [
40             'cronet/android/java/src/org/chromium/net/UrlRequestPriority.template',
41           ],
42           'variables': {
43             'package_name': 'org/chromium/cronet',
44             'template_deps': ['cronet/android/org_chromium_net_UrlRequest_priority_list.h'],
45           },
46           'includes': [ '../build/android/java_cpp_template.gypi' ],
47         },
48         {
49           'target_name': 'libcronet',
50           'type': 'shared_library',
51           'dependencies': [
52             '../base/base.gyp:base',
53             '../base/base.gyp:base_i18n',
54             '../third_party/icu/icu.gyp:icui18n',
55             '../third_party/icu/icu.gyp:icuuc',
56             '../url/url.gyp:url_lib',
57             'cronet_jni_headers',
58             'cronet_url_request_error_list',
59             'cronet_url_request_priority_list',
60             '../net/net.gyp:net',
61           ],
62           'sources': [
63             'cronet/android/org_chromium_net_UrlRequest.cc',
64             'cronet/android/org_chromium_net_UrlRequest.h',
65             'cronet/android/org_chromium_net_UrlRequest_error_list.h',
66             'cronet/android/org_chromium_net_UrlRequest_priority_list.h',
67             'cronet/android/org_chromium_net_UrlRequestContext.cc',
68             'cronet/android/url_request_context_peer.cc',
69             'cronet/android/url_request_context_peer.h',
70             'cronet/android/url_request_peer.cc',
71             'cronet/android/url_request_peer.h',
72           ],
73           'cflags': [
74             # TODO(mef): Figure out a good way to get version from chrome_version_info_posix.h.
75             '-DCHROMIUM_VERSION=\\"TBD\\"',
76             '-DLOGGING=1',
77             '-fdata-sections',
78             '-ffunction-sections',
79             '-fno-rtti',
80             '-fvisibility=hidden',
81             '-fvisibility-inlines-hidden',
82             '-Wno-sign-promo',
83             '-Wno-missing-field-initializers',
84           ],
85           'ldflags': [
86             '-llog',
87             '-landroid',
88             '-Wl,--gc-sections',
89             '-Wl,--exclude-libs,ALL'
90           ]
91         },
92         {
93           'target_name': 'cronet',
94           'type': 'none',
95           'dependencies': [
96             '../base/base.gyp:base',
97             'libcronet',
98             'cronet_url_request_error_list',
99             'cronet_url_request_priority_list',
100           ],
101           'variables': {
102             'java_in_dir': 'cronet/android/java',
103           },
104           'includes': [ '../build/java.gypi' ],
105         },
106         {
107           'target_name': 'cronet_package',
108           'type': 'none',
109           'dependencies': [
110             'libcronet',
111             'cronet',
112           ],
113           'variables': {
114               'native_lib': 'libcronet.>(android_product_extension)',
115               'java_lib': 'cronet.jar',
116               'package_dir': '<(PRODUCT_DIR)/cronet',
117           },
118           'actions': [
119             {
120               'action_name': 'strip libcronet',
121               'inputs': ['<(SHARED_LIB_DIR)/<(native_lib)'],
122               'outputs': ['<(package_dir)/libs/<(android_app_abi)/<(native_lib)'],
123               'action': [
124                 '<(android_strip)',
125                 '--strip-unneeded',
126                 '<@(_inputs)',
127                 '-o',
128                 '<@(_outputs)',
129               ],
130             },
131           ],
132           'copies': [
133             {
134               'destination': '<(package_dir)',
135               'files': [
136                 '<(PRODUCT_DIR)/lib.java/<(java_lib)',
137               ],
138             },
139           ],
140         },
141         {
142           'target_name': 'cronet_sample_apk',
143           'type': 'none',
144           'dependencies': [
145             'cronet',
146           ],
147           'variables': {
148             'apk_name': 'CronetSample',
149             'java_in_dir': 'cronet/android/sample',
150             'resource_dir': 'cronet/android/sample/res',
151             'native_lib_target': 'libcronet',
152           },
153           'includes': [ '../build/java_apk.gypi' ],
154         },
155         {
156           # cronet_sample_apk creates a .jar as a side effect. Any java targets
157           # that need that .jar in their classpath should depend on this target,
158           # cronet_sample_apk_java. Dependents of cronet_sample_apk receive its
159           # jar path in the variable 'apk_output_jar_path'. This target should
160           # only be used by targets which instrument cronet_sample_apk.
161           'target_name': 'cronet_sample_apk_java',
162           'type': 'none',
163           'dependencies': [
164             'cronet_sample_apk',
165           ],
166           'includes': [ '../build/apk_fake_jar.gypi' ],
167         },
168         {
169           'target_name': 'cronet_sample_test_apk',
170           'type': 'none',
171           'dependencies': [
172             'cronet_sample_apk_java',
173             '../base/base.gyp:base_java',
174             '../base/base.gyp:base_javatests',
175             '../base/base.gyp:base_java_test_support',
176             # TODO(mef): Figure out why some tests are failing.
177             #'../net/net.gyp:net_javatests',
178             #'../net/net.gyp:net_java_test_support',
179           ],
180           'variables': {
181             'apk_name': 'CronetSampleTest',
182             'java_in_dir': 'cronet/android/sample/javatests',
183             'resource_dir': 'cronet/android/sample/res',
184             'is_test_apk': 1,
185           },
186           'includes': [ '../build/java_apk.gypi' ],
187         },
188       ],
189     }],  # OS=="android"
190   ],