Chromium Code Reviews| Index: webapk/shell_apk/BUILD.gn |
| diff --git a/webapk/shell_apk/BUILD.gn b/webapk/shell_apk/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5c1550848c0cce14ab98f5cc0c2d887cd9fc9e9c |
| --- /dev/null |
| +++ b/webapk/shell_apk/BUILD.gn |
| @@ -0,0 +1,89 @@ |
| +# Copyright 2015 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +import("//build/config/android/rules.gni") |
| + |
| +declare_args() { |
| + # The origin URL of minted apks, for example: "foo.com" |
|
Yaron
2016/05/05 17:17:18
.. of the shell apk..
|
| + manifest_package_minting_origin = "template" |
|
Yaron
2016/05/05 17:17:18
s/_minting_//
|
| + |
| + # The browser to which WebAPKs will be bound. |
| + runtime_host = "com.google.android.apps.chrome" |
| + |
| + # The URL for the minted apks, for example: "https://foo.com" |
| + host_url = "https://www.template.com/home_page" |
| + scope_url_host = "www.template.com" |
| + |
| + # The message authentication code from Chrome for identity verification. |
| + mac = "template" |
| + |
| + # The scope of the Urls that the Minted APKs could navigate to. |
| + scope = "https://www.template.com" |
| +} |
| + |
| +manifest_package_minting = "org.chromium.minting" |
|
Yaron
2016/05/05 17:17:18
manifest_package_webapk = "org.chromium.webapk"
Xi Han
2016/05/05 17:22:11
If updating the package name now, there are anothe
pkotwicz
2016/05/05 17:25:14
I should have mentioned this in the CL comments. I
|
| + |
| +shell_apk_manifest = "$target_gen_dir/shell_apk_manifest/AndroidManifest.xml" |
| + |
| +jinja_template("shell_apk_manifest") { |
| + input = "AndroidManifest.xml" |
| + output = shell_apk_manifest |
| + |
| + # The variable values must be non empty and globally unique in |
| + # AndroidManifest.xml in order for the string substitution in APKMinting.java |
| + # to work. |
| + variables = [ |
| + "manifest_package=$manifest_package_minting.$manifest_package_minting_origin", |
| + "min_sdk_version=16", |
| + "target_sdk_version=23", |
| + "host_url=$host_url", |
| + "runtime_host=$runtime_host", |
| + "scope_url_host=$scope_url_host", |
| + "mac=$mac", |
| + "scope=$scope", |
| + ] |
| +} |
| + |
| +android_resources("shell_apk_resources") { |
| + resource_dirs = [ "res" ] |
| + custom_package = "org.chromium.webapk.shell_apk" |
| +} |
| + |
| +android_library("dex_loader_lib") { |
| + java_files = [ "src/org/chromium/webapk/shell_apk/DexLoader.java" ] |
| +} |
| + |
| +android_apk("shell_apk") { |
| + android_manifest = shell_apk_manifest |
| + apk_name = "MintingExample.$manifest_package_minting_origin" |
| + native_lib_placeholders = [ "libfoo.so" ] |
| + java_files = [ |
| + "src/org/chromium/webapk/shell_apk/MainActivity.java", |
| + "src/org/chromium/webapk/shell_apk/WebApkApplication.java", |
| + "src/org/chromium/webapk/shell_apk/WebApkServiceFactory.java", |
| + "src/org/chromium/webapk/shell_apk/Reflect.java", |
| + ] |
| + chromium_code = false |
| + proguard_enabled = true |
| + proguard_configs = [ "proguard.flags" ] |
| + deps = [ |
| + ":dex_loader_lib", |
| + ":shell_apk_manifest", |
| + ":shell_apk_resources", |
| + "//webapk/libs/common", |
| + ] |
| +} |
| + |
| +android_library("shell_apk_javatests") { |
| + testonly = true |
| + java_files = |
| + [ "javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java" ] |
| + deps = [ |
| + ":dex_loader_lib", |
| + "//base:base_java", |
| + "//content/public/test/android:content_java_test_support", |
| + "//webapk/libs/common", |
| + ] |
| + srcjar_deps = [ "javatests/dex_optimizer:dex_optimizer_service_aidl" ] |
| +} |