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

Unified Diff: webapk/shell_apk/BUILD.gn

Issue 1945303005: Change webapk packages and directory structure (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webapk/shell_apk/AndroidManifest.xml ('k') | webapk/shell_apk/javatests/canary_lib/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
+ manifest_package_minting_origin = "template"
+
+ # 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"
+
+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" ]
+}
« no previous file with comments | « webapk/shell_apk/AndroidManifest.xml ('k') | webapk/shell_apk/javatests/canary_lib/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698