gn: More helpful default args file
[chromium-blink-merge.git] / components / devtools_bridge.gyp
bloba0faaa333fc43acafb97dd8b7c817b60f8137167
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   'includes': [
7     '../build/util/version.gypi',
8   ],
9   'targets': [
10     {
11       'target_name': 'devtools_bridge_jni_headers',
12       'type': 'none',
13       'sources': [
14         'devtools_bridge/android/java/src/org/chromium/components/devtools_bridge/SessionDependencyFactoryNative.java',
15         'devtools_bridge/test/android/client/javatests/src/org/chromium/components/devtools_bridge/WebClient.java',
16       ],
17       'variables': {
18         'jni_gen_package': 'devtools_bridge',
19       },
20       'includes': [ '../build/jni_generator.gypi' ],
21     },
22     {
23       'target_name': 'devtools_bridge_server',
24       'type': 'static_library',
25       'sources': [
26         'devtools_bridge/android/session_dependency_factory_android.cc',
27         'devtools_bridge/android/session_dependency_factory_android.h',
28         'devtools_bridge/session_dependency_factory.cc',
29         'devtools_bridge/session_dependency_factory.h',
30         'devtools_bridge/socket_tunnel_connection.cc',
31         'devtools_bridge/socket_tunnel_connection.h',
32         'devtools_bridge/socket_tunnel_packet_handler.cc',
33         'devtools_bridge/socket_tunnel_packet_handler.h',
34         'devtools_bridge/socket_tunnel_server.cc',
35         'devtools_bridge/socket_tunnel_server.h',
36       ],
37       'dependencies': [
38         '<(DEPTH)/base/base.gyp:base',
39         '<(DEPTH)/third_party/libjingle/libjingle.gyp:libjingle_webrtc',
40         '<(DEPTH)/third_party/libjingle/libjingle.gyp:libpeerconnection',
41         '<(DEPTH)/third_party/webrtc/base/base.gyp:webrtc_base',
42         'devtools_bridge_jni_headers',
43       ],
44     },
45     {
46       'target_name': 'devtools_bridge_server_javalib',
47       'type': 'none',
48       'variables': {
49         'java_in_dir': 'devtools_bridge/android/java',
50       },
51       'includes': [ '../build/java.gypi' ],
52       'dependencies': [
53         '<(DEPTH)/base/base.gyp:base_java',
54         '<(DEPTH)/third_party/android_tools/android_tools.gyp:android_gcm',
55       ],
56     },
57     {
58       'target_name': 'libdevtools_bridge_natives_so',
59       'type': 'shared_library',
60       'sources': [
61         'devtools_bridge/test/android/javatests/jni/jni_onload.cc',
62       ],
63       'dependencies': [
64         '<(DEPTH)/base/base.gyp:base',
65         'devtools_bridge_server',
66       ],
67     },
68     {
69       'target_name': 'devtools_bridge_testutils',
70       'type': 'none',
71       'variables': {
72         'java_in_dir': 'devtools_bridge/test/android/javatests',
73       },
74       'includes': [ '../build/java.gypi' ],
75       'dependencies': [
76         'devtools_bridge_server_javalib',
77       ],
78     },
79     {
80       'target_name': 'devtools_bridge_tests_apk',
81       'type': 'none',
82       'dependencies': [
83         'devtools_bridge_server_javalib',
84         'devtools_bridge_testutils',
85         'libdevtools_bridge_natives_so',
86       ],
87       'variables': {
88         'apk_name': 'DevToolsBridgeTest',
89         'test_suite_name': 'devtools_bridge_tests',
90         'java_in_dir': 'devtools_bridge/android/javatests',
91         'native_lib_target': 'libdevtools_bridge_natives_so',
92         'is_test_apk': 1,
93       },
94       'includes': [ '../build/java_apk.gypi' ],
95     },
96     {
97       'target_name': 'libdevtools_bridge_browsertests',
98       'type': 'shared_library',
99       'sources': [
100         'devtools_bridge/test/android/client/javatests/jni/jni_onload.cc',
101         'devtools_bridge/test/android/client/web_client_android.cc',
102         'devtools_bridge/test/android/client/web_client_android.h',
103       ],
104       'dependencies': [
105         '<(DEPTH)/chrome/chrome.gyp:libchromeshell_base',
106         'devtools_bridge_client',
107         'devtools_bridge_jni_headers',
108         'devtools_bridge_server',
109       ],
110     },
111     {
112       'target_name': 'devtools_bridge_browsertests_resources',
113       'type': 'none',
114       'dependencies': [
115         '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
116       ],
117       'variables': {
118         'asset_location': '<(PRODUCT_DIR)/devtools_bridge_browsertests_apk/assets',
119       },
120       'inputs': [
121         '<(PRODUCT_DIR)/chrome_100_percent.pak',
122         '<(PRODUCT_DIR)/locales/en-US.pak',
123         '<(PRODUCT_DIR)/resources.pak',
124       ],
125       'copies': [
126         {
127           'destination': '<(asset_location)',
128           'files': [
129             '<(PRODUCT_DIR)/chrome_100_percent.pak',
130             '<(PRODUCT_DIR)/locales/en-US.pak',
131             '<(PRODUCT_DIR)/resources.pak',
132           ],
133           'conditions': [
134             ['icu_use_data_file_flag==1', {
135               'files': [ '<(PRODUCT_DIR)/icudtl.dat' ],
136             }],
137             ['v8_use_external_startup_data==1', {
138               'files': [
139                 '<(PRODUCT_DIR)/natives_blob.bin',
140                 '<(PRODUCT_DIR)/snapshot_blob.bin',
141               ],
142             }],
143           ],
144         },
145       ],
146     },
147     {
148       'target_name': 'devtools_bridge_browsertests_apk',
149       'type': 'none',
150       'dependencies': [
151         '<(DEPTH)/base/base.gyp:base_java',
152         '<(DEPTH)/chrome/chrome.gyp:chrome_java',
153         'devtools_bridge_browsertests_resources',
154         'devtools_bridge_server_javalib',
155         'libdevtools_bridge_browsertests',
156       ],
157       'variables': {
158         'apk_name': 'DevToolsBridgeBrowserTests',
159         'test_suite_name': 'devtools_bridge_tests',
160         'java_in_dir': 'devtools_bridge/android/client/javatests',
161         'additional_src_dirs': ['devtools_bridge/test/android/client/javatests'],
162         'native_lib_target': 'libdevtools_bridge_browsertests',
163         'asset_location': '<(PRODUCT_DIR)/devtools_bridge_browsertests_apk/assets',
164         'native_lib_version_name': '<(version_full)',
165         'is_test_apk': 1,
166       },
167       'includes': [ '../build/java_apk.gypi' ],
168     },
170     # TODO(serya): Separate from android targets. Otherwise it may not be
171     # used outside of android.
172     {
173       'target_name': 'devtools_bridge_client',
174       'type': 'static_library',
175       'sources': [
176         'devtools_bridge/client/web_client.cc',
177         'devtools_bridge/client/web_client.h',
178       ],
179       'dependencies': [
180         '<(DEPTH)/base/base.gyp:base',
181         '<(DEPTH)/content/content.gyp:content',
182       ],
183     },
184   ],