Commit 62e33bd2 authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

[Android WebAPK] Move manifest config files to manifest/ directory

This CL also deletes unused javatest_manifest_config.json

BUG=899274

Change-Id: Icdf3992983af4a0a9b4a942b544570bebd64448a
Reviewed-on: https://chromium-review.googlesource.com/c/1302094
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: default avatarXi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603177}
parent 2ee44ad3
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
import("current_version/current_version.gni") import("current_version/current_version.gni")
import("manifest_processor.gni") import("manifest/manifest_mustache_pass.gni")
android_resources("new_splash_resources") { android_resources("new_splash_resources") {
custom_package = "org.chromium.webapk.shell_apk.h2o" custom_package = "org.chromium.webapk.shell_apk.h2o"
...@@ -83,7 +83,7 @@ template("webapk_tmpl") { ...@@ -83,7 +83,7 @@ template("webapk_tmpl") {
# Generate manifest to upload to WebAPK server. Fills in all of the fields # Generate manifest to upload to WebAPK server. Fills in all of the fields
# that the server cannot customize on a per-site basis. # that the server cannot customize on a per-site basis.
manifest_processor_template(_manifest_to_upload_target_name) { manifest_mustache_pass(_manifest_to_upload_target_name) {
input = "AndroidManifest.xml" input = "AndroidManifest.xml"
output = _manifest_to_upload_output output = _manifest_to_upload_output
extra_variables = [ extra_variables = [
...@@ -93,7 +93,7 @@ template("webapk_tmpl") { ...@@ -93,7 +93,7 @@ template("webapk_tmpl") {
} }
# Generate manifest with test values. # Generate manifest with test values.
manifest_processor_template(_manifest_target_name) { manifest_mustache_pass(_manifest_target_name) {
forward_variables_from(invoker, [ "config_file" ]) forward_variables_from(invoker, [ "config_file" ])
input = _manifest_to_upload_output input = _manifest_to_upload_output
...@@ -206,28 +206,28 @@ java_strings_grd("webapk_strings_grd") { ...@@ -206,28 +206,28 @@ java_strings_grd("webapk_strings_grd") {
# - Android manifest is customized to the website. # - Android manifest is customized to the website.
# - App icon is extracted from the website and added to the APK's resources. # - App icon is extracted from the website and added to the APK's resources.
webapk_tmpl("webapk") { webapk_tmpl("webapk") {
config_file = "bound_manifest_config.json" config_file = "manifest/bound_manifest_config.json"
apk_name = "WebApk" apk_name = "WebApk"
} }
webapk_tmpl("maps_go_webapk") { webapk_tmpl("maps_go_webapk") {
config_file = "maps_go_manifest_config.json" config_file = "manifest/maps_go_manifest_config.json"
apk_name = "MapsWebApk" apk_name = "MapsWebApk"
} }
webapk_tmpl("unbound_webapk") { webapk_tmpl("unbound_webapk") {
config_file = "unbound_manifest_config.json" config_file = "manifest/unbound_manifest_config.json"
apk_name = "UnboundWebApk" apk_name = "UnboundWebApk"
} }
webapk_tmpl("http_webapk") { webapk_tmpl("http_webapk") {
config_file = "http_manifest_config.json" config_file = "manifest/http_manifest_config.json"
apk_name = "HttpWebApk" apk_name = "HttpWebApk"
} }
webapk_tmpl("new_splash_webapk") { webapk_tmpl("new_splash_webapk") {
use_new_splash = true use_new_splash = true
config_file = "new_splash_manifest_config.json" config_file = "manifest/new_splash_manifest_config.json"
apk_name = "NewSplashWebApk" apk_name = "NewSplashWebApk"
} }
......
{
"manifest_package": "org.chromium.webapk.test",
"scope_url": "https://pwa.rocks/",
"intent_filters": {
"scope_url_scheme": "https",
"scope_url_host": "pwa.rocks",
"scope_url_path_type": "android:pathPrefix",
"scope_url_path": "/"
},
"start_url": "https://pwa.rocks/",
"display_mode": "standalone",
"orientation": "portrait",
"theme_color": "2147483648L",
"background_color": "2147483648L",
"icon_urls_and_icon_murmur2_hashes": "http://www.pwa.rocks/icon1.png 0 http://www.pwa.rocks/icon2.png 0",
"web_manifest_url": "https://pwa.rocks/pwa.webmanifest",
"distributor": "browser",
"version_code": "1",
"version_name": "1.0",
"bound_webapk": {
"runtime_host": "org.chromium.chrome",
"runtime_host_application_name": "Chromium"
}
}
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
import("//build/config/android/rules.gni") import("//build/config/android/rules.gni")
template("manifest_processor_template") { template("manifest_mustache_pass") {
set_sources_assignment_filter([]) set_sources_assignment_filter([])
forward_variables_from(invoker, [ "testonly" ]) forward_variables_from(invoker, [ "testonly" ])
...@@ -23,7 +23,8 @@ template("manifest_processor_template") { ...@@ -23,7 +23,8 @@ template("manifest_processor_template") {
if (defined(invoker.config_file)) { if (defined(invoker.config_file)) {
sources += [ invoker.config_file ] sources += [ invoker.config_file ]
} }
script = "//chrome/android/webapk/shell_apk/manifest_processor.py" script =
"//chrome/android/webapk/shell_apk/manifest/manifest_mustache_pass.py"
outputs = [ outputs = [
invoker.output, invoker.output,
......
...@@ -14,7 +14,7 @@ import sys ...@@ -14,7 +14,7 @@ import sys
#Import pystache from //third_party/pystache #Import pystache from //third_party/pystache
src_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, src_dir = os.path.join(os.path.dirname(__file__), os.pardir, os.pardir,
os.pardir, os.pardir) os.pardir, os.pardir, os.pardir)
sys.path.append(os.path.join(src_dir, 'third_party')) sys.path.append(os.path.join(src_dir, 'third_party'))
import pystache import pystache
sys.path.append(os.path.join(src_dir, 'build', 'android', 'gyp', 'util')) sys.path.append(os.path.join(src_dir, 'build', 'android', 'gyp', 'util'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment