Index: chrome/android/webapk/shell_apk/BUILD.gn |
diff --git a/chrome/android/webapk/shell_apk/BUILD.gn b/chrome/android/webapk/shell_apk/BUILD.gn |
index 1bac854f3f8fa209d378661f5341bd3841996d30..8fa67e941931f7dc788aa7f4dfff65beb7a4bc9e 100644 |
--- a/chrome/android/webapk/shell_apk/BUILD.gn |
+++ b/chrome/android/webapk/shell_apk/BUILD.gn |
@@ -6,46 +6,6 @@ import("//build/config/android/rules.gni") |
import("manifest_processor.gni") |
import("shell_apk_version.gni") |
-declare_args() { |
- # The browser that the WebAPK will be bound to. |
- webapk_runtime_host = "com.google.android.apps.chrome" |
- |
- # The application name of the browser that the WebAPK will be bound to. |
- webapk_runtime_host_application_name = "Chromium" |
- |
- # The Url of the Web Manifest file. |
- webapk_web_manifest_url = "https://pwa.rocks/pwa.webmanifest" |
- |
- # Murmur2 hash of the homescreen icon. The hash should be of the icon as it is |
- # available from the web. The icon bytes should not be transformed (e.g. |
- # decoded / encoded) prior to taking the hash. |
- webapk_icon_murmur2_hash = "0" |
- |
- # Attributes from Web Manifest. |
- webapk_start_url = "https://pwa.rocks/" |
- webapk_scope_url = "https://pwa.rocks/" |
- webapk_display_mode = "standalone" |
- webapk_orientation = "portrait" |
- webapk_theme_color = "2147483648L" # HostBrowserLauncher#MANIFEST_COLOR_INVALID_OR_MISSING |
- webapk_background_color = "2147483648L" #HostBrowserLauncher#MANIFEST_COLOR_INVALID_OR_MISSING |
- webapk_icon_urls_and_icon_murmur2_hashes = "http://www.pwa.rocks/icon1.png $webapk_icon_murmur2_hash http://www.pwa.rocks/icon2.png $webapk_icon_murmur2_hash" |
- |
- # Scheme part of |webapk_scope_url|. |
- webapk_scope_url_scheme = "https" |
- |
- # Host part of |webapk_scope_url|. |
- webapk_scope_url_host = "pwa.rocks" |
- |
- # Path part of |webapk_scope_url|. |
- webapk_scope_url_path = "/" |
- |
- # Android version code for the WebAPK. |
- webapk_version_code = "1" |
- |
- # Android version name for the WebAPK. |
- webapk_version_name = "1.0" |
-} |
- |
shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml" |
unbound_shell_apk_manifest = |
"$target_gen_dir/unbound_shell_apk_manifest/AndroidManifest.xml" |
@@ -54,78 +14,27 @@ shell_apk_manifest_javatests = |
manifest_processor_template("shell_apk_manifest") { |
input = "AndroidManifest.xml" |
+ config_file = "bound_manifest_config.json" |
output = shell_apk_manifest |
- variables = [ |
- "shell_apk_version=$template_shell_apk_version", |
- "manifest_package=org.chromium.webapk", |
- "runtime_host=$webapk_runtime_host", |
- "runtime_host_application_name=$webapk_runtime_host_application_name", |
- "start_url=$webapk_start_url", |
- "scope_url=$webapk_scope_url", |
- "display_mode=$webapk_display_mode", |
- "orientation=$webapk_orientation", |
- "theme_color=$webapk_theme_color", |
- "background_color=$webapk_background_color", |
- "icon_urls_and_icon_murmur2_hashes=$webapk_icon_urls_and_icon_murmur2_hashes", |
- "scope_url_scheme=$webapk_scope_url_scheme", |
- "scope_url_host=$webapk_scope_url_host", |
- "scope_url_path=$webapk_scope_url_path", |
- "web_manifest_url=$webapk_web_manifest_url", |
- "version_code=$webapk_version_code", |
- "version_name=$webapk_version_name", |
- ] |
+ extra_variables = [ "shell_apk_version=$template_shell_apk_version" ] |
} |
manifest_processor_template("unbound_shell_apk_manifest") { |
input = "AndroidManifest.xml" |
+ config_file = "unbound_manifest_config.json" |
output = unbound_shell_apk_manifest |
- variables = [ |
- "shell_apk_version=$template_shell_apk_version", |
- "manifest_package=org.chromium.arbitrarypackage", |
- |
- # Intentionally omitted: "runtime_host=org.chromium.chrome", |
- "include_label=true", |
- "start_url=$webapk_start_url", |
- "scope_url=$webapk_scope_url", |
- "display_mode=$webapk_display_mode", |
- "orientation=$webapk_orientation", |
- "theme_color=$webapk_theme_color", |
- "background_color=$webapk_background_color", |
- "icon_urls_and_icon_murmur2_hashes=$webapk_icon_urls_and_icon_murmur2_hashes", |
- "scope_url_scheme=$webapk_scope_url_scheme", |
- "scope_url_host=$webapk_scope_url_host", |
- "scope_url_path=$webapk_scope_url_path", |
- "web_manifest_url=$webapk_web_manifest_url", |
- "version_code=$webapk_version_code", |
- "version_name=$webapk_version_name", |
- ] |
+ extra_variables = [ "shell_apk_version=$template_shell_apk_version" ] |
} |
# Manifest for instrumentation tests. Cannot be customized via GN args. |
manifest_processor_template("shell_apk_manifest_javatests") { |
input = "AndroidManifest.xml" |
+ config_file = "javatest_manifest_config.json" |
output = shell_apk_manifest_javatests |
- variables = [ |
- "shell_apk_version=$template_shell_apk_version", |
- "manifest_package=org.chromium.webapk.test", |
- "runtime_host=org.chromium.chrome", |
- "start_url=https://pwa.rocks", |
- "scope_url=https://pwa.rocks", |
- "display_mode=standalone", |
- "orientation=portrait", |
- "theme_color=2147483648L", # HostBrowserLauncher#MANIFEST_COLOR_INVALID_OR_MISSING |
- "background_color=2147483648L", # HostBrowserLauncher#MANIFEST_COLOR_INVALID_OR_MISSING |
- "icon_urls_and_icon_murmur2_hashes=", |
- "scope_url_scheme=https", |
- "scope_url_host=pwa.rocks", |
- "scope_url_path=/", |
- "web_manifest_url=https://pwa.rocks/pwa.webmanifest", |
- "version_code=1", |
- "version_name=1.0", |
- ] |
+ extra_variables = [ "shell_apk_version=$template_shell_apk_version" ] |
} |
android_resources("shell_apk_resources") { |
@@ -278,6 +187,7 @@ android_library("shell_apk_javatests") { |
junit_binary("webapk_shell_apk_junit_tests") { |
java_files = [ |
"junit/src/org/chromium/webapk/shell_apk/HostBrowserClassLoaderTest.java", |
+ "junit/src/org/chromium/webapk/shell_apk/MainActivityTest.java", |
"junit/src/org/chromium/webapk/shell_apk/WebApkUtilsTest.java", |
] |
deps = [ |