-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathswe_android_browser.gypi
146 lines (140 loc) · 5.09 KB
/
swe_android_browser.gypi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{
'variables' : {
#This needs to be in sync with java package name, required to generate R.java
'swe_browser_java_package': 'com.android.browser',
},
'targets' : [
{
'target_name': 'swe_android_browser_apk',
'type': 'none',
'dependencies': [
'swe_android_browser_apk_config',
'<@(swe_dependencies)',
#add new dependencies in swe_common.gypi
],
'variables': {
'apk_name': 'SWE_AndroidBrowser',
'native_lib_version_name': '<(version_full)',
'java_in_dir': '.',
'resource_dir': '../browser/res',
#TODO need proguard config file before we can enable this
'proguard_enabled': 'false',
'conditions': [
['icu_use_data_file_flag==1', {
'additional_input_paths': [
'<(PRODUCT_DIR)/icudtl.dat',
],
}],
],
'native_lib_target': 'libswe',
'app_manifest_version_code': '<(swe_app_manifest_version_code)',
'app_manifest_version_name': '<(swe_app_manifest_version_name)',
'additional_native_libs': [
'<@(swe_additional_native_libs)',
],
'additional_input_paths': [
'<@(chrome_android_pak_output_resources)',
],
'res_extra_dirs': [ '<@(swe_extra_res_dirs)',
],
'R_package': '<(swe_browser_java_package)',
'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/swe_android_browser_apk/AndroidManifest.xml',
},
'copies': [
{
'destination': '<(PRODUCT_DIR)/swe_android_browser_apk/assets/',
'files': [
'<@(swe_assets)',
],
},
{
'destination': '<(PRODUCT_DIR)/swe_android_browser_apk/assets/wml',
'files': [
'<@(swe_assets_wml)',
],
},
],
'includes': [ '../../build/java_apk.gypi' ],
},
#generate swe_channel.py for telemetry support
{
'target_name': 'swe_channel_py',
'type': 'none',
'variables': {
'manifest_input_path': '<(DEPTH)/swe/tools/swe_channel.py.jinja2',
'manifest_output_path': '<(DEPTH)/swe/tools/swe_channel.py',
'manifest_config_file_path': '<(browser_config_path)',
'swe_manifest_package': '',
},
'includes': [ '../swe_generate_manifest.gypi' ],
},
#generate AndroidManifest.xml
{
'target_name': 'swe_android_browser_apk_manifest',
'type': 'none',
'dependencies': [
'swe_android_browser_apk_manifest_internal_tool',
'swe_channel_py'
],
'variables': {
'manifest_input_path': '<(DEPTH)/swe/browser/AndroidManifest.xml.jinja2',
'manifest_output_path': '<(SHARED_INTERMEDIATE_DIR)/swe_android_browser_apk/AndroidManifest.xml',
'manifest_config_file_path': '<(browser_config_path)',
'swe_manifest_package': '',
},
'includes': [ '../swe_generate_manifest.gypi' ],
},
#generate AndroidManifest.xml for internal tool
{
'target_name': 'swe_android_browser_apk_manifest_internal_tool',
'type': 'none',
'variables': {
'manifest_input_path': '<(DEPTH)/swe/browser/AndroidManifest.xml.jinja2',
'manifest_output_path': '<(SHARED_INTERMEDIATE_DIR)/swe_android_browser_apk/as/AndroidManifest.xml',
'manifest_config_file_path': '<(browser_config_path)',
'swe_manifest_package': '<(swe_browser_java_package)',
},
'includes': [ '../swe_generate_manifest.gypi' ],
},
{
'target_name': 'swe_android_browser_apk_config',
'type': 'none',
'variables': {
'template_input_path': '<(DEPTH)/swe/browser/template/com/android/browser/BrowserConfig.java.template',
'template_output_path': '<(SHARED_INTERMEDIATE_DIR)/templates/<(_target_name)/com/android/browser/BrowserConfig.java',
'template_config_file_path': '<(browser_config_path)',
},
'includes': [ '../swe_browser_config.gypi' ],
},
{
'target_name': 'swe_android_browser_fake_apk',
'type': 'none',
'dependencies': [
'swe_android_browser_apk',
],
'includes': [ '../../build/apk_fake_jar.gypi' ],
},
{
'target_name': 'swe_android_browser_tests_apk',
'type': 'none',
'dependencies': [
'swe_android_browser_fake_apk',
'../base/base.gyp:base_java_test_support',
'../content/content_shell_and_tests.gyp:content_java_test_support',
'../net/net.gyp:net_java_test_support',
],
'variables': {
'apk_name': 'SWEBrowserTests',
'standalone_manifest_package_name': '<!(python <(swe_py_config) \
-i <(browser_config_path) \
-c PACKAGE_NAME)',
'override_package_name': '<(standalone_manifest_package_name).tests',
'android_manifest_path': './tests/AndroidManifest.xml',
'java_in_dir': './tests/startup',
'is_test_apk': 1,
'test_suite_name': 'swe_android_browser_tests',
},
'includes': [ '../../build/java_apk.gypi' ],
},
],
}