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

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

Issue 1960853002: Initial CL for Web APKs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
(Empty)
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
3 # found in the LICENSE file.
4
5 import("//build/config/android/rules.gni")
6
7 declare_args() {
8 # The origin URL of the WebAPK. Used to generate a unique package name for
9 # WebAPK. Example: "foo.com"
10 webapk_manifest_package_origin = "template"
11
12 # The URL that the WebAPK should navigate to when it is launched.
13 webapk_start_url = "https://www.template.com/home_page"
14
15 # The browser that the WebAPK will be bound to.
16 webapk_runtime_host = "com.google.android.apps.chrome"
17
18 # The message authentication code from Chrome for identity verification.
19 webapk_mac = "template"
20
21 # The scope of the urls that the WebAPK can navigate to.
22 webapk_scope = "https://www.template.com"
23 }
24
25 shell_apk_manifest_package =
26 "org.chromium.webapk.$webapk_manifest_package_origin"
27
28 shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml"
29
30 jinja_template("shell_apk_manifest") {
31 input = "AndroidManifest.xml"
32 output = shell_apk_manifest
33
34 variables = [
35 "manifest_package=$shell_apk_manifest_package",
36 "host_url=$webapk_start_url",
37 "runtime_host=$webapk_runtime_host",
38 "mac=$webapk_mac",
39 "scope=$webapk_scope",
40 ]
41 }
42
43 android_resources("shell_apk_resources") {
44 resource_dirs = [ "res" ]
45 custom_package = "org.chromium.webapk.shell_apk"
46 }
47
48 # Template for WebAPK. When a WebAPK is generated:
49 # - Android manifest is customized to the website.
50 # - App icon is extracted from the website and added to the APK's resources.
51 android_apk("webapk") {
52 android_manifest = shell_apk_manifest
53 apk_name = "WebApk.$webapk_manifest_package_origin"
54 java_files = [ "src/org/chromium/webapk/shell_apk/MainActivity.java" ]
55 deps = [
56 ":shell_apk_manifest",
57 ":shell_apk_resources",
58 "//chrome/android/webapk/libs/common",
59 ]
60 }
OLDNEW
« no previous file with comments | « chrome/android/webapk/shell_apk/AndroidManifest.xml ('k') | chrome/android/webapk/shell_apk/res/drawable-mdpi/app_icon.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698