Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1236)

Side by Side Diff: chrome/android/webapk/shell_apk/BUILD.gn

Issue 2956193002: [Android] Enable WebAPK to have multiple intent filters (Closed)
Patch Set: Merge branch 'mustache' into rewriting Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/rules.gni") 5 import("//build/config/android/rules.gni")
6 import("manifest_processor.gni") 6 import("manifest_processor.gni")
7 import("shell_apk_version.gni") 7 import("shell_apk_version.gni")
8 8
9 declare_args() {
10 # The browser that the WebAPK will be bound to.
11 webapk_runtime_host = "com.google.android.apps.chrome"
12
13 # The application name of the browser that the WebAPK will be bound to.
14 webapk_runtime_host_application_name = "Chromium"
15
16 # The Url of the Web Manifest file.
17 webapk_web_manifest_url = "https://pwa.rocks/pwa.webmanifest"
18
19 # Murmur2 hash of the homescreen icon. The hash should be of the icon as it is
20 # available from the web. The icon bytes should not be transformed (e.g.
21 # decoded / encoded) prior to taking the hash.
22 webapk_icon_murmur2_hash = "0"
23
24 # Attributes from Web Manifest.
25 webapk_start_url = "https://pwa.rocks/"
26 webapk_scope_url = "https://pwa.rocks/"
27 webapk_display_mode = "standalone"
28 webapk_orientation = "portrait"
29 webapk_theme_color = "2147483648L" # HostBrowserLauncher#MANIFEST_COLOR_INVAL ID_OR_MISSING
30 webapk_background_color = "2147483648L" #HostBrowserLauncher#MANIFEST_COLOR_I NVALID_OR_MISSING
31 webapk_icon_urls_and_icon_murmur2_hashes = "http://www.pwa.rocks/icon1.png $we bapk_icon_murmur2_hash http://www.pwa.rocks/icon2.png $webapk_icon_murmur2_hash"
32
33 # Scheme part of |webapk_scope_url|.
34 webapk_scope_url_scheme = "https"
35
36 # Host part of |webapk_scope_url|.
37 webapk_scope_url_host = "pwa.rocks"
38
39 # Path part of |webapk_scope_url|.
40 webapk_scope_url_path = "/"
41
42 # Android version code for the WebAPK.
43 webapk_version_code = "1"
44
45 # Android version name for the WebAPK.
46 webapk_version_name = "1.0"
47 }
48
49 shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml" 9 shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml"
50 unbound_shell_apk_manifest = 10 unbound_shell_apk_manifest =
51 "$target_gen_dir/unbound_shell_apk_manifest/AndroidManifest.xml" 11 "$target_gen_dir/unbound_shell_apk_manifest/AndroidManifest.xml"
52 shell_apk_manifest_javatests = 12 shell_apk_manifest_javatests =
53 "$target_gen_dir/shell_apk_manifest_javatests/AndroidManifest.xml" 13 "$target_gen_dir/shell_apk_manifest_javatests/AndroidManifest.xml"
54 14
55 manifest_processor_template("shell_apk_manifest") { 15 manifest_processor_template("shell_apk_manifest") {
56 input = "AndroidManifest.xml" 16 input = "AndroidManifest.xml"
17 config_file = "bound_manifest_config.json"
57 output = shell_apk_manifest 18 output = shell_apk_manifest
58 19
59 variables = [ 20 extra_variables = [ "shell_apk_version=$template_shell_apk_version" ]
Yaron 2017/06/29 02:15:07 Did you keep this around for testing purposes? The
pkotwicz 2017/06/29 04:46:41 $template_shell_apk_version comes from shell_apk_v
Yaron 2017/07/10 23:39:35 sgtm :)
60 "shell_apk_version=$template_shell_apk_version",
61 "manifest_package=org.chromium.webapk",
62 "runtime_host=$webapk_runtime_host",
63 "runtime_host_application_name=$webapk_runtime_host_application_name",
64 "start_url=$webapk_start_url",
65 "scope_url=$webapk_scope_url",
66 "display_mode=$webapk_display_mode",
67 "orientation=$webapk_orientation",
68 "theme_color=$webapk_theme_color",
69 "background_color=$webapk_background_color",
70 "icon_urls_and_icon_murmur2_hashes=$webapk_icon_urls_and_icon_murmur2_hashes ",
71 "scope_url_scheme=$webapk_scope_url_scheme",
72 "scope_url_host=$webapk_scope_url_host",
73 "scope_url_path=$webapk_scope_url_path",
74 "web_manifest_url=$webapk_web_manifest_url",
75 "version_code=$webapk_version_code",
76 "version_name=$webapk_version_name",
77 ]
78 } 21 }
79 22
80 manifest_processor_template("unbound_shell_apk_manifest") { 23 manifest_processor_template("unbound_shell_apk_manifest") {
81 input = "AndroidManifest.xml" 24 input = "AndroidManifest.xml"
25 config_file = "unbound_manifest_config.json"
82 output = unbound_shell_apk_manifest 26 output = unbound_shell_apk_manifest
83 27
84 variables = [ 28 extra_variables = [ "shell_apk_version=$template_shell_apk_version" ]
85 "shell_apk_version=$template_shell_apk_version",
86 "manifest_package=org.chromium.arbitrarypackage",
87
88 # Intentionally omitted: "runtime_host=org.chromium.chrome",
89 "include_label=true",
90 "start_url=$webapk_start_url",
91 "scope_url=$webapk_scope_url",
92 "display_mode=$webapk_display_mode",
93 "orientation=$webapk_orientation",
94 "theme_color=$webapk_theme_color",
95 "background_color=$webapk_background_color",
96 "icon_urls_and_icon_murmur2_hashes=$webapk_icon_urls_and_icon_murmur2_hashes ",
97 "scope_url_scheme=$webapk_scope_url_scheme",
98 "scope_url_host=$webapk_scope_url_host",
99 "scope_url_path=$webapk_scope_url_path",
100 "web_manifest_url=$webapk_web_manifest_url",
101 "version_code=$webapk_version_code",
102 "version_name=$webapk_version_name",
103 ]
104 } 29 }
105 30
106 # Manifest for instrumentation tests. Cannot be customized via GN args. 31 # Manifest for instrumentation tests. Cannot be customized via GN args.
107 manifest_processor_template("shell_apk_manifest_javatests") { 32 manifest_processor_template("shell_apk_manifest_javatests") {
108 input = "AndroidManifest.xml" 33 input = "AndroidManifest.xml"
34 config_file = "javatest_manifest_config.json"
109 output = shell_apk_manifest_javatests 35 output = shell_apk_manifest_javatests
110 36
111 variables = [ 37 extra_variables = [ "shell_apk_version=$template_shell_apk_version" ]
112 "shell_apk_version=$template_shell_apk_version",
113 "manifest_package=org.chromium.webapk.test",
114 "runtime_host=org.chromium.chrome",
115 "start_url=https://pwa.rocks",
116 "scope_url=https://pwa.rocks",
117 "display_mode=standalone",
118 "orientation=portrait",
119 "theme_color=2147483648L", # HostBrowserLauncher#MANIFEST_COLOR_INVALID_OR_ MISSING
120 "background_color=2147483648L", # HostBrowserLauncher#MANIFEST_COLOR_INVALI D_OR_MISSING
121 "icon_urls_and_icon_murmur2_hashes=",
122 "scope_url_scheme=https",
123 "scope_url_host=pwa.rocks",
124 "scope_url_path=/",
125 "web_manifest_url=https://pwa.rocks/pwa.webmanifest",
126 "version_code=1",
127 "version_name=1.0",
128 ]
129 } 38 }
130 39
131 android_resources("shell_apk_resources") { 40 android_resources("shell_apk_resources") {
132 resource_dirs = [ "res" ] 41 resource_dirs = [ "res" ]
133 custom_package = "org.chromium.webapk.shell_apk" 42 custom_package = "org.chromium.webapk.shell_apk"
134 deps = [ 43 deps = [
135 ":webapk_strings_grd", 44 ":webapk_strings_grd",
136 ] 45 ]
137 } 46 }
138 47
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 java_files = [ 184 java_files = [
276 "junit/src/org/chromium/webapk/shell_apk/HostBrowserClassLoaderTest.java", 185 "junit/src/org/chromium/webapk/shell_apk/HostBrowserClassLoaderTest.java",
277 "junit/src/org/chromium/webapk/shell_apk/WebApkUtilsTest.java", 186 "junit/src/org/chromium/webapk/shell_apk/WebApkUtilsTest.java",
278 ] 187 ]
279 deps = [ 188 deps = [
280 ":webapk_java", 189 ":webapk_java",
281 "//chrome/android/webapk/libs/common:common_java", 190 "//chrome/android/webapk/libs/common:common_java",
282 "//chrome/android/webapk/test:junit_test_support", 191 "//chrome/android/webapk/test:junit_test_support",
283 ] 192 ]
284 } 193 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698