OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/android/rules.gni") | 5 import("//build/config/android/rules.gni") |
6 | 6 |
7 declare_args() { | 7 declare_args() { |
8 # The origin URL of minted apks, for example: "foo.com" | 8 # The origin URL of minted apks, for example: "foo.com" |
9 manifest_package_minting_origin = "template" | 9 manifest_package_minting_origin = "template" |
10 | 10 |
| 11 # The browser to which WebAPKs will be bound. |
| 12 runtime_host = "com.google.android.apps.chrome" |
| 13 |
11 # The URL for the minted apks, for example: "https://foo.com" | 14 # The URL for the minted apks, for example: "https://foo.com" |
12 host_url = "https://www.template.com/home_page" | 15 host_url = "https://www.template.com/home_page" |
13 scope_url_host = "www.template.com" | 16 scope_url_host = "www.template.com" |
14 | 17 |
15 # The message authentication code from Chrome for identity verification. | 18 # The message authentication code from Chrome for identity verification. |
16 mac = "template" | 19 mac = "template" |
17 | 20 |
18 # The scope of the Urls that the Minted APKs could navigate to. | 21 # The scope of the Urls that the Minted APKs could navigate to. |
19 scope = "https://www.template.com" | 22 scope = "https://www.template.com" |
20 } | 23 } |
(...skipping 14 matching lines...) Expand all Loading... |
35 output = minting_example_manifest | 38 output = minting_example_manifest |
36 | 39 |
37 # The variable values must be non empty and globally unique in | 40 # The variable values must be non empty and globally unique in |
38 # AndroidManifest.xml in order for the string substitution in APKMinting.java | 41 # AndroidManifest.xml in order for the string substitution in APKMinting.java |
39 # to work. | 42 # to work. |
40 variables = [ | 43 variables = [ |
41 "manifest_package=$manifest_package_minting.$manifest_package_minting_origin
", | 44 "manifest_package=$manifest_package_minting.$manifest_package_minting_origin
", |
42 "min_sdk_version=16", | 45 "min_sdk_version=16", |
43 "target_sdk_version=23", | 46 "target_sdk_version=23", |
44 "host_url=$host_url", | 47 "host_url=$host_url", |
| 48 "runtime_host=$runtime_host", |
45 "scope_url_host=$scope_url_host", | 49 "scope_url_host=$scope_url_host", |
46 "mac=$mac", | 50 "mac=$mac", |
47 "scope=$scope", | 51 "scope=$scope", |
48 ] | 52 ] |
49 } | 53 } |
50 | 54 |
51 android_resources("minting_apk_resources") { | 55 android_resources("minting_apk_resources") { |
52 resource_dirs = [ "$minting_example_dir/res" ] | 56 resource_dirs = [ "$minting_example_dir/res" ] |
53 custom_package = "$manifest_package_minting" | 57 custom_package = "$manifest_package_minting" |
54 } | 58 } |
55 | 59 |
56 android_library("minting_client_lib") { | 60 android_library("minting_client_lib") { |
57 java_files = [ | 61 java_files = [ |
58 "$minting_client_dir/org/chromium/minting/lib/client/DexOptimizer.java", | 62 "$minting_client_dir/org/chromium/minting/lib/client/DexOptimizer.java", |
59 "$minting_client_dir/org/chromium/minting/lib/client/MintingStateParams.java
", | 63 "$minting_client_dir/org/chromium/minting/lib/client/MintingStateParams.java
", |
60 "$minting_client_dir/org/chromium/minting/lib/client/NavigationClient.java", | 64 "$minting_client_dir/org/chromium/minting/lib/client/NavigationClient.java", |
61 "$minting_client_dir/org/chromium/minting/lib/client/NotificationBuilderDele
gate.java", | 65 "$minting_client_dir/org/chromium/minting/lib/client/NotificationBuilderDele
gate.java", |
62 "$minting_client_dir/org/chromium/minting/lib/client/NotificationClient.java
", | 66 "$minting_client_dir/org/chromium/minting/lib/client/NotificationClient.java
", |
63 "$minting_client_dir/org/chromium/minting/lib/client/WebAPKRegistry.java", | 67 "$minting_client_dir/org/chromium/minting/lib/client/WebAPKRegistry.java", |
64 "$minting_client_dir/org/chromium/minting/lib/client/WebAPKValidator.java", | 68 "$minting_client_dir/org/chromium/minting/lib/client/WebAPKValidator.java", |
65 ] | 69 ] |
66 deps = [ | 70 deps = [ |
67 ":minting_common_lib", | 71 ":minting_common_lib", |
68 "//third_party/android_tools:android_support_v13_java", | 72 "//third_party/android_tools:android_support_v13_java", |
69 ] | 73 ] |
70 srcjar_deps = [ ":minting_service_aidl" ] | 74 srcjar_deps = [ ":minting_service_aidl" ] |
71 } | 75 } |
72 | 76 |
73 android_library("minting_common_lib") { | 77 android_library("minting_common_lib") { |
74 java_files = [ "$minting_common_dir/org/chromium/minting/lib/common/WebAPKCons
tants.java" ] | 78 java_files = [ |
| 79 "$minting_common_dir/org/chromium/minting/lib/common/WebAPKConstants.java", |
| 80 "$minting_common_dir/org/chromium/minting/lib/common/WebAPKUtils.java" |
| 81 ] |
75 } | 82 } |
76 | 83 |
77 android_aidl("minting_service_aidl") { | 84 android_aidl("minting_service_aidl") { |
78 import_include = "$minting_runtime_library_dir/src/org/chromium/minting" | 85 import_include = "$minting_runtime_library_dir/src/org/chromium/minting" |
79 interface_file = | 86 interface_file = |
80 "$minting_runtime_library_dir/src/org/chromium/minting/common.aidl" | 87 "$minting_runtime_library_dir/src/org/chromium/minting/common.aidl" |
81 sources = [ | 88 sources = [ |
82 "$minting_runtime_library_dir/src/org/chromium/minting/IMintedApi.aidl", | 89 "$minting_runtime_library_dir/src/org/chromium/minting/IMintedApi.aidl", |
83 "$minting_runtime_library_dir/src/org/chromium/minting/IMintedApiCallback.ai
dl", | 90 "$minting_runtime_library_dir/src/org/chromium/minting/IMintedApiCallback.ai
dl", |
84 ] | 91 ] |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 ":minting_apk_resources", | 132 ":minting_apk_resources", |
126 ":minting_common_lib", | 133 ":minting_common_lib", |
127 ":minting_example_manifest", | 134 ":minting_example_manifest", |
128 ] | 135 ] |
129 } | 136 } |
130 | 137 |
131 android_library("web_apk_javatests") { | 138 android_library("web_apk_javatests") { |
132 java_files = [ "$minting_example_dir/javatests/src/org/chromium/minting/DexLoa
derTest.java" ] | 139 java_files = [ "$minting_example_dir/javatests/src/org/chromium/minting/DexLoa
derTest.java" ] |
133 deps = [ | 140 deps = [ |
134 ":dex_loader_lib", | 141 ":dex_loader_lib", |
| 142 ":minting_common_lib", |
135 "//base:base_java", | 143 "//base:base_java", |
136 "//content/public/test/android:content_java_test_support", | 144 "//content/public/test/android:content_java_test_support", |
137 ] | 145 ] |
138 srcjar_deps = [ "//web_apks/minting_example/javatests/dex_optimizer:dex_optimi
zer_service_aidl" ] | 146 srcjar_deps = [ "//web_apks/minting_example/javatests/dex_optimizer:dex_optimi
zer_service_aidl" ] |
139 } | 147 } |
OLD | NEW |