Add Authenticator.SUPPORTED_PARAMS to mimic GaiaAuthHost interface
[chromium-blink-merge.git] / google_apis / google_apis.gyp
blob228fba828cd8bc0df52325e0d1064aba14804065
1 # Copyright (c) 2012 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   'variables': {
7     'chromium_code': 1,  # Use higher warning level.
8   },
9   'includes': [
10     '../build/win_precompile.gypi',
11   ],
12   'targets': [
13     {
14       # GN version: //google_apis
15       'target_name': 'google_apis',
16       'type': 'static_library',
17       'includes': [
18         'determine_use_official_keys.gypi',
19       ],
20       'dependencies': [
21         '../base/base.gyp:base',
22         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
23         '../crypto/crypto.gyp:crypto',
24         '../net/net.gyp:net',
25         '../third_party/libxml/libxml.gyp:libxml',
26         '../url/url.gyp:url_lib',
27       ],
28       'conditions': [
29         ['google_api_key!=""', {
30           'defines': ['GOOGLE_API_KEY="<(google_api_key)"'],
31         }],
32         ['google_default_client_id!=""', {
33           'defines': [
34             'GOOGLE_DEFAULT_CLIENT_ID="<(google_default_client_id)"',
35           ]
36         }],
37         ['google_default_client_secret!=""', {
38           'defines': [
39             'GOOGLE_DEFAULT_CLIENT_SECRET="<(google_default_client_secret)"',
40           ]
41         }],
42         ['enable_extensions==1', {
43           'sources': [
44             # Note: sources list duplicated in GN build.
45             'drive/auth_service.cc',
46             'drive/auth_service.h',
47             'drive/auth_service_interface.h',
48             'drive/auth_service_observer.h',
49             'drive/base_requests.cc',
50             'drive/base_requests.h',
51             'drive/drive_api_parser.cc',
52             'drive/drive_api_parser.h',
53             'drive/drive_api_requests.cc',
54             'drive/drive_api_requests.h',
55             'drive/drive_api_url_generator.cc',
56             'drive/drive_api_url_generator.h',
57             'drive/drive_common_callbacks.h',
58             'drive/gdata_errorcode.cc',
59             'drive/gdata_errorcode.h',
60             'drive/gdata_wapi_requests.cc',
61             'drive/gdata_wapi_requests.h',
62             'drive/gdata_wapi_parser.cc',
63             'drive/gdata_wapi_parser.h',
64             'drive/gdata_wapi_url_generator.cc',
65             'drive/gdata_wapi_url_generator.h',
66             'drive/request_sender.cc',
67             'drive/request_sender.h',
68             'drive/request_util.cc',
69             'drive/request_util.h',
70             'drive/task_util.cc',
71             'drive/task_util.h',
72             'drive/time_util.cc',
73             'drive/time_util.h',
74           ],
75         }],
76       ],
77       'sources': [
78         # Note: sources list duplicated in GN build.
79         'gaia/account_tracker.cc',
80         'gaia/account_tracker.h',
81         'gaia/gaia_auth_consumer.cc',
82         'gaia/gaia_auth_consumer.h',
83         'gaia/gaia_auth_fetcher.cc',
84         'gaia/gaia_auth_fetcher.h',
85         'gaia/gaia_auth_util.cc',
86         'gaia/gaia_auth_util.h',
87         'gaia/gaia_constants.cc',
88         'gaia/gaia_constants.h',
89         'gaia/gaia_oauth_client.cc',
90         'gaia/gaia_oauth_client.h',
91         'gaia/gaia_switches.cc',
92         'gaia/gaia_switches.h',
93         'gaia/gaia_urls.cc',
94         'gaia/gaia_urls.h',
95         'gaia/google_service_auth_error.cc',
96         'gaia/google_service_auth_error.h',
97         'gaia/identity_provider.cc',
98         'gaia/identity_provider.h',
99         'gaia/merge_session_helper.cc',
100         'gaia/merge_session_helper.h',
101         'gaia/oauth_request_signer.cc',
102         'gaia/oauth_request_signer.h',
103         'gaia/oauth2_access_token_consumer.h',
104         'gaia/oauth2_access_token_fetcher.h',
105         'gaia/oauth2_access_token_fetcher.cc',
106         'gaia/oauth2_access_token_fetcher_impl.cc',
107         'gaia/oauth2_access_token_fetcher_impl.h',
108         'gaia/oauth2_api_call_flow.cc',
109         'gaia/oauth2_api_call_flow.h',
110         'gaia/oauth2_mint_token_flow.cc',
111         'gaia/oauth2_mint_token_flow.h',
112         'gaia/oauth2_token_service.cc',
113         'gaia/oauth2_token_service.h',
114         'gaia/oauth2_token_service_request.cc',
115         'gaia/oauth2_token_service_request.h',
116         'gaia/ubertoken_fetcher.cc',
117         'gaia/ubertoken_fetcher.h',
118         'google_api_keys.cc',
119         'google_api_keys.h',
120       ],
121       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
122       'msvs_disabled_warnings': [4267, ],
123     },
124     {
125       'target_name': 'google_apis_unittests',
126       'type': 'executable',
127       'dependencies': [
128         '../base/base.gyp:run_all_unittests',
129         '../testing/gmock.gyp:gmock',
130         '../testing/gtest.gyp:gtest',
131         'google_apis',
132         'google_apis_test_support',
133       ],
134       'includes': [
135         'determine_use_official_keys.gypi',
136       ],
137       'include_dirs': [
138         '..',
139       ],
140       'sources': [
141         'google_api_keys_unittest.cc',
142         'gaia/account_tracker_unittest.cc',
143         'gaia/gaia_auth_fetcher_unittest.cc',
144         'gaia/gaia_auth_util_unittest.cc',
145         'gaia/gaia_oauth_client_unittest.cc',
146         'gaia/google_service_auth_error_unittest.cc',
147         'gaia/merge_session_helper_unittest.cc',
148         'gaia/oauth_request_signer_unittest.cc',
149         'gaia/oauth2_access_token_fetcher_impl_unittest.cc',
150         'gaia/oauth2_api_call_flow_unittest.cc',
151         'gaia/oauth2_mint_token_flow_unittest.cc',
152         'gaia/oauth2_token_service_request_unittest.cc',
153         'gaia/oauth2_token_service_unittest.cc',
154         'gaia/ubertoken_fetcher_unittest.cc',
155       ],
156       'conditions': [
157         ['enable_extensions==1', {
158           'sources': [
159             'drive/base_requests_server_unittest.cc',
160             'drive/base_requests_unittest.cc',
161             'drive/drive_api_parser_unittest.cc',
162             'drive/drive_api_requests_unittest.cc',
163             'drive/drive_api_url_generator_unittest.cc',
164             'drive/gdata_wapi_parser_unittest.cc',
165             'drive/gdata_wapi_requests_unittest.cc',
166             'drive/gdata_wapi_url_generator_unittest.cc',
167             'drive/request_sender_unittest.cc',
168             'drive/request_util_unittest.cc',
169             'drive/time_util_unittest.cc',
170           ],
171         }],
172       ],
173     },
174     {
175       # GN version: //google_apis:test_support
176       'target_name': 'google_apis_test_support',
177       'type': 'static_library',
178       'dependencies': [
179         '../base/base.gyp:base',
180         '../base/base.gyp:test_support_base',
181         '../net/net.gyp:net',
182         '../net/net.gyp:net_test_support',
183       ],
184       'export_dependent_settings': [
185         '../base/base.gyp:base',
186         '../base/base.gyp:test_support_base',
187         '../net/net.gyp:net',
188         '../net/net.gyp:net_test_support',
189       ],
190       'sources': [
191         'gaia/fake_gaia.cc',
192         'gaia/fake_gaia.h',
193         'gaia/fake_identity_provider.cc',
194         'gaia/fake_identity_provider.h',
195         'gaia/fake_oauth2_token_service.cc',
196         'gaia/fake_oauth2_token_service.h',
197         'gaia/mock_url_fetcher_factory.h',
198         'gaia/oauth2_token_service_test_util.cc',
199         'gaia/oauth2_token_service_test_util.h',
200       ],
201       'conditions': [
202         ['enable_extensions==1', {
203           'sources': [
204             'drive/dummy_auth_service.cc',
205             'drive/dummy_auth_service.h',
206             'drive/test_util.cc',
207             'drive/test_util.h',
208           ],
209         }],
210       ],
211     },
212   ],