| 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 the WebAPK. Used to generate a unique package name for | 8 # The origin URL of the WebAPK. Used to generate a unique package name for |
| 9 # WebAPK. Example: "foo.com" | 9 # WebAPK. Example: "foo.com" |
| 10 webapk_manifest_package_origin = "template" | 10 webapk_manifest_package_origin = "template" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 "scope_url=$webapk_scope_url", | 42 "scope_url=$webapk_scope_url", |
| 43 "scope_url_host=$webapk_scope_url_host", | 43 "scope_url_host=$webapk_scope_url_host", |
| 44 ] | 44 ] |
| 45 } | 45 } |
| 46 | 46 |
| 47 android_resources("shell_apk_resources") { | 47 android_resources("shell_apk_resources") { |
| 48 resource_dirs = [ "res" ] | 48 resource_dirs = [ "res" ] |
| 49 custom_package = "org.chromium.webapk.shell_apk" | 49 custom_package = "org.chromium.webapk.shell_apk" |
| 50 } | 50 } |
| 51 | 51 |
| 52 android_library("dex_loader_lib") { |
| 53 java_files = [ "src/org/chromium/webapk/shell_apk/DexLoader.java" ] |
| 54 } |
| 55 |
| 52 # Template for WebAPK. When a WebAPK is generated: | 56 # Template for WebAPK. When a WebAPK is generated: |
| 53 # - Android manifest is customized to the website. | 57 # - Android manifest is customized to the website. |
| 54 # - App icon is extracted from the website and added to the APK's resources. | 58 # - App icon is extracted from the website and added to the APK's resources. |
| 55 android_apk("webapk") { | 59 android_apk("webapk") { |
| 56 android_manifest = shell_apk_manifest | 60 android_manifest = shell_apk_manifest |
| 57 apk_name = "WebApk.$webapk_manifest_package_origin" | 61 apk_name = "WebApk.$webapk_manifest_package_origin" |
| 58 java_files = [ "src/org/chromium/webapk/shell_apk/MainActivity.java" ] | 62 java_files = [ "src/org/chromium/webapk/shell_apk/MainActivity.java" ] |
| 59 deps = [ | 63 deps = [ |
| 60 ":shell_apk_manifest", | 64 ":shell_apk_manifest", |
| 61 ":shell_apk_resources", | 65 ":shell_apk_resources", |
| 62 "//chrome/android/webapk/libs/common", | 66 "//chrome/android/webapk/libs/common", |
| 63 ] | 67 ] |
| 64 } | 68 } |
| 69 |
| 70 android_library("shell_apk_javatests") { |
| 71 testonly = true |
| 72 java_files = |
| 73 [ "javatests/src/org/chromium/webapk/shell_apk/DexLoaderTest.java" ] |
| 74 deps = [ |
| 75 ":dex_loader_lib", |
| 76 "//base:base_java", |
| 77 "//chrome/android/webapk/libs/common", |
| 78 "//content/public/test/android:content_java_test_support", |
| 79 ] |
| 80 srcjar_deps = [ "javatests/dex_optimizer:dex_optimizer_service_aidl" ] |
| 81 } |
| OLD | NEW |