Roll WebKit 141933:141963
[chromium-blink-merge.git] / chrome / chrome_android.gypi
blob70b7ba6c2e3dd050c5d8df0343bfdb8128343d12
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.
5   'variables': {
6     'chromium_code': 1,
7     'package_name': 'chromium_testshell',
8   },
9   'includes': [
10     'chrome_android_paks.gypi', # Included for the list of pak resources.
11   ],
12   'targets': [
13     {
14       'target_name': 'libchromiumtestshell',
15       'type': 'shared_library',
16       'dependencies': [
17         'chrome_android_core',
18       ],
19       'sources': [
20         # This file must always be included in the shared_library step to ensure
21         # JNI_OnLoad is exported.
22         'app/android/chrome_jni_onload.cc',
24         'android/testshell/chrome_main_delegate_testshell_android.cc',
25         'android/testshell/chrome_main_delegate_testshell_android.h',
26         "android/testshell/testshell_google_location_settings_helper.cc",
27         "android/testshell/testshell_google_location_settings_helper.h",
28         'android/testshell/testshell_stubs.cc',
29       ],
30       'include_dirs': [
31         '<(SHARED_INTERMEDIATE_DIR)/android',
32         '<(SHARED_INTERMEDIATE_DIR)/chromium_testshell',
33         '../skia/config',
34       ],
35       'conditions': [
36         [ 'order_profiling!=0', {
37           'conditions': [
38             [ 'OS=="android"', {
39               'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
40             }],
41           ],
42         }],
43       ],
44     },
45     {
46       'target_name': 'chromium_testshell',
47       'type': 'none',
48       'dependencies': [
49         '../media/media.gyp:media_java',
50         'chrome.gyp:chrome_java',
51         'chromium_testshell_paks',
52         'libchromiumtestshell',
53       ],
54       'variables': {
55         'apk_name': 'ChromiumTestShell',
56         'manifest_package_name': 'org.chromium.chrome.testshell',
57         'java_in_dir': 'android/testshell/java',
58         'resource_dir': '../res',
59         'asset_location': '<(ant_build_out)/../assets/<(package_name)',
60         'native_libs_paths': [ '<(SHARED_LIB_DIR)/libchromiumtestshell.so', ],
61         'additional_input_paths': [
62           '<@(chrome_android_pak_output_resources)',
63           '<(chrome_android_pak_output_folder)/devtools_resources.pak',
64         ],
65       },
66       'includes': [ '../build/java_apk.gypi', ],
67     },
68     {
69       # chromium_testshell creates a .jar as a side effect. Any java targets
70       # that need that .jar in their classpath should depend on this target,
71       # chromium_testshell_java. Dependents of chromium_testshell receive its
72       # jar path in the variable 'apk_output_jar_path'.
73       'target_name': 'chromium_testshell_java',
74       'type': 'none',
75       'dependencies': [
76         'chromium_testshell',
77       ],
78       # This all_dependent_settings is used for java targets only. This will add
79       # the chromium_testshell jar to the classpath of dependent java targets.
80       'all_dependent_settings': {
81         'variables': {
82           'input_jars_paths': ['>(apk_output_jar_path)'],
83         },
84       },
85       # Add an action with the appropriate output. This allows the generated
86       # buildfiles to determine which target the output corresponds to.
87       'actions': [
88         {
89           'action_name': 'fake_generate_jar',
90           'inputs': [],
91           'outputs': ['>(apk_output_jar_path)'],
92           'action': [],
93         },
94       ],
95     },
96     {
97       'target_name': 'chrome_android_core',
98       'type': 'static_library',
99       'dependencies': [
100         'chrome.gyp:browser',
101         'chrome.gyp:plugin',
102         'chrome.gyp:renderer',
103         'chrome.gyp:utility',
104         '../content/content.gyp:content',
105       ],
106       'include_dirs': [
107         '..',
108         '<(SHARED_INTERMEDIATE_DIR)/android',
109         '<(SHARED_INTERMEDIATE_DIR)/chrome',
110         '<(android_ndk_include)',
111       ],
112       'sources': [
113         'app/android/chrome_android_initializer.cc',
114         'app/android/chrome_android_initializer.h',
115         'app/android/chrome_main_delegate_android.cc',
116         'app/android/chrome_main_delegate_android.h',
117         'app/chrome_main_delegate.cc',
118         'app/chrome_main_delegate.h',
119       ],
120       'link_settings': {
121         'libraries': [
122           '-landroid',
123           '-ljnigraphics',
124         ],
125       },
126     },
127     {
128       'target_name': 'chromium_testshell_paks',
129       'type': 'none',
130       'dependencies': [
131         '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
132         '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
133       ],
134       'copies': [
135         {
136           'destination': '<(chrome_android_pak_output_folder)',
137           'files': [
138             '<@(chrome_android_pak_input_resources)',
139             '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
140           ],
141         }
142       ],
143     },
144   ],