Roll src/third_party/WebKit fe3d0ed:840e60d (svn 202350:202351)
[chromium-blink-merge.git] / chrome / chrome_android.gypi
blob81ab5f9c9d8af9fb8785bc0dee02492c51ec7a95
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     'conditions': [
8       ['android_must_copy_system_libraries == 0 and target_arch != "arm64" and target_arch != "x64" and profiling_full_stack_frames != 1', {
9         # Only enable the chromium linker on regular builds, since the
10         # component build crashes on Android 4.4. See b/11379966
11         'use_chromium_linker': '1',
12       }],
13     ],
14   },
15   'targets': [
16     {
17       # GN: //chrome:chrome_android_core
18       'target_name': 'chrome_android_core',
19       'type': 'static_library',
20       'dependencies': [
21         'chrome.gyp:browser',
22         'chrome.gyp:browser_ui',
23         'chrome.gyp:child',
24         'chrome.gyp:plugin',
25         'chrome.gyp:renderer',
26         'chrome.gyp:utility',
27         # TODO(kkimlabs): Move this to chrome.gyp:browser when the dependent
28         #                 is upstreamed.
29         '../components/components.gyp:enhanced_bookmarks',
30         '../content/content.gyp:content',
31         '../content/content.gyp:content_app_both',
32       ],
33       'include_dirs': [
34         '..',
35         '<(android_ndk_include)',
36       ],
37       'sources': [
38         'app/android/chrome_android_initializer.cc',
39         'app/android/chrome_android_initializer.h',
40         'app/android/chrome_jni_onload.cc',
41         'app/android/chrome_jni_onload.h',
42         'app/android/chrome_main_delegate_android.cc',
43         'app/android/chrome_main_delegate_android.h',
44         'app/chrome_main_delegate.cc',
45         'app/chrome_main_delegate.h',
46       ],
47       'link_settings': {
48         'libraries': [
49           '-landroid',
50           '-ljnigraphics',
51         ],
52       },
53     },
54     {
55       # GYP: //chrome/android:chrome_version_java
56       'target_name': 'chrome_version_java',
57       'type': 'none',
58       'variables': {
59         'template_input_path': 'android/java/ChromeVersionConstants.java.version',
60         'version_path': 'VERSION',
61         'version_py_path': '<(DEPTH)/build/util/version.py',
62         'output_path': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/org/chromium/chrome/browser/ChromeVersionConstants.java',
64         'conditions': [
65           ['branding == "Chrome"', {
66             'branding_path': 'app/theme/google_chrome/BRANDING',
67           }, {
68             'branding_path': 'app/theme/chromium/BRANDING',
69           }],
70         ],
71       },
72       'direct_dependent_settings': {
73         'variables': {
74           # Ensure that the output directory is used in the class path
75           # when building targets that depend on this one.
76           'generated_src_dirs': [
77             '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)',
78           ],
79           # Ensure dependents are rebuilt when the generated Java file changes.
80           'additional_input_paths': [
81             '<(output_path)',
82           ],
83         },
84       },
85       'actions': [
86         {
87           'action_name': 'chrome_version_java_template',
88           'inputs': [
89             '<(template_input_path)',
90             '<(version_path)',
91             '<(branding_path)',
92             '<(version_py_path)',
93           ],
94           'outputs': [
95             '<(output_path)',
96           ],
97           'action': [
98             'python',
99             '<(version_py_path)',
100             '-f', '<(version_path)',
101             '-f', '<(branding_path)',
102             '-e', 'CHANNEL=str.upper("<(android_channel)")',
103             '<(template_input_path)',
104             '<(output_path)',
105           ],
106         },
107       ],
108     },
109   ],