forked from crosswalk-project/crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xwalk_android_app.gypi
145 lines (145 loc) · 4.55 KB
/
xwalk_android_app.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
{
'targets': [
{
'target_name': 'xwalk_app_runtime_client_java',
'type': 'none',
'variables': {
'java_in_dir': 'app/android/runtime_client',
'generated_src_dirs': [ '<(intermediate_dir)/version_java' ],
},
'actions': [
{
# Generate the version for runtime client.
'action_name': 'generate_runtime_client_version',
'variables': {
'template_file': 'app/android/runtime_client/src/templates/XWalkRuntimeClientVersion.template',
'output_file': '<(intermediate_dir)/version_java/XWalkRuntimeClientVersion.java',
},
'inputs': [
'<(template_file)',
'build/android/generate_runtime_client_version.py',
],
'outputs': [
'<(output_file)',
],
'action': [
'python', 'build/android/generate_runtime_client_version.py',
'--template=<(template_file)',
'--output=<(output_file)',
'--xwalk-version=<(xwalk_version)',
],
},
],
'includes': ['../build/java.gypi'],
},
{
'target_name': 'xwalk_app_runtime_activity_java',
'type': 'none',
'dependencies': [
'xwalk_app_runtime_client_java',
],
'variables': {
'java_in_dir': 'app/android/runtime_activity',
},
'includes': ['../build/java.gypi'],
},
{
'target_name': 'xwalk_app_template_apk',
'type': 'none',
'dependencies': [
'xwalk_app_runtime_activity_java',
],
'variables': {
'apk_name': 'XWalkAppTemplate',
'java_in_dir': 'app/android/app_template',
'resource_dir': 'app/android/app_template/res',
'asset_location': 'app/android/app_template/assets',
'additional_input_paths': [
'<(asset_location)/extensions-config.json',
'<(asset_location)/index.html',
'<(asset_location)/sampapp-icon-helloworld.png',
],
},
'includes': [ '../build/java_apk.gypi' ],
},
{
'target_name': 'prepare_xwalk_app_template',
'type': 'none',
'dependencies': [
'xwalk_app_template_apk',
],
'copies': [
{
'destination': '<(PRODUCT_DIR)/xwalk_app_template/libs/',
'files': [
'<(PRODUCT_DIR)/lib.java/xwalk_app_runtime_activity_java.dex.jar',
'<(PRODUCT_DIR)/lib.java/xwalk_app_runtime_activity_java.jar',
'<(PRODUCT_DIR)/lib.java/xwalk_app_runtime_client_java.dex.jar',
'<(PRODUCT_DIR)/lib.java/xwalk_app_runtime_client_java.jar',
],
},
{
'destination': '<(PRODUCT_DIR)/xwalk_app_template/scripts/ant',
'files': [
'./build/android/ant/apk-codegen.xml',
'./build/android/ant/apk-package.xml',
'./build/android/ant/apk-package-resources.xml',
'./build/android/ant/xwalk-debug.keystore',
],
},
{
'destination': '<(PRODUCT_DIR)/xwalk_app_template/scripts/gyp/',
'files': [
'./build/android/gyp/dex.py',
'./build/android/gyp/finalize_apk.py',
'../build/android/gyp/ant.py',
'../build/android/gyp/jar.py',
'../build/android/gyp/javac.py',
'../build/android/gyp/util/',
],
},
{
'destination': '<(PRODUCT_DIR)/xwalk_app_template/app_src/',
'files': [
'app/android/app_template/AndroidManifest.xml',
'app/android/app_template/assets',
'app/android/app_template/res',
'app/android/app_template/src',
],
},
{
'destination': '<(PRODUCT_DIR)/xwalk_app_template/',
'files': [
'build/android/customize.py',
'build/android/make_apk.py',
],
},
],
},
{
'target_name': 'xwalk_app_template',
'type': 'none',
'dependencies': [
'prepare_xwalk_app_template',
],
'actions': [
{
'action_name': 'tar_app_template',
'inputs': [
'app/android/app_template/AndroidManifest.xml',
'tools/tar.py',
],
'outputs': [
'<(PRODUCT_DIR)/xwalk_app_template.tar.gz',
# put an inexist file here to do this step every time.
'<(PRODUCT_DIR)/xwalk_app_template.tar.gz1',
],
'action': [
'python', 'tools/tar.py',
'<(PRODUCT_DIR)/xwalk_app_template'
],
},
],
},
],
}