OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 import("//chrome/android/webapk/libs/runtime_library_version.gni") | 6 import("//chrome/android/webapk/libs/runtime_library_version.gni") |
7 | 7 |
8 # runtime_library_version.gni must be updated whenever the runtime library is | 8 # runtime_library_version.gni must be updated whenever the runtime library is |
9 # updated. The WebAPK re-extracts the runtime library from the Chrome APK when | 9 # updated. The WebAPK re-extracts the runtime library from the Chrome APK when |
10 # |runtime_library_version| is incremented. | 10 # |runtime_library_version| is incremented. |
11 | 11 |
12 # Whenever this constant is changed, WebApkUtils#getRuntimeDexName() must also | 12 # Whenever this constant is changed, WebApkUtils#getRuntimeDexName() must also |
13 # be changed. | 13 # be changed. |
14 runtime_library_dex_asset_name = "webapk$runtime_library_version.dex" | 14 runtime_library_dex_asset_name = "webapk$runtime_library_version.dex" |
15 | 15 |
16 android_aidl("webapk_service_aidl") { | 16 android_aidl("webapk_service_aidl") { |
17 import_include = "src/org/chromium/webapk/lib/runtime_library" | 17 import_include = "src/org/chromium/webapk/lib/runtime_library" |
18 interface_file = "src/org/chromium/webapk/lib/runtime_library/common.aidl" | 18 interface_file = "src/org/chromium/webapk/lib/runtime_library/common.aidl" |
19 sources = [ | 19 sources = [ |
20 "src/org/chromium/webapk/lib/runtime_library/IWebApkApi.aidl", | 20 "src/org/chromium/webapk/lib/runtime_library/IWebApkApi.aidl", |
21 ] | 21 ] |
22 } | 22 } |
23 | 23 |
24 android_library("runtime_library_java") { | 24 android_library("runtime_library_java") { |
25 dex_path = "$target_gen_dir/$runtime_library_dex_asset_name" | 25 dex_path = "$target_gen_dir/$runtime_library_dex_asset_name" |
26 java_files = | 26 java_files = [ |
27 [ "src/org/chromium/webapk/lib/runtime_library/WebApkServiceImpl.java" ] | 27 "src/org/chromium/webapk/lib/runtime_library/HostBrowserLauncher.java", |
| 28 "src/org/chromium/webapk/lib/runtime_library/WebApkServiceImpl.java", |
| 29 ] |
28 srcjar_deps = [ ":webapk_service_aidl" ] | 30 srcjar_deps = [ ":webapk_service_aidl" ] |
| 31 deps = [ |
| 32 "//chrome/android/webapk/libs/common:common_java", |
| 33 ] |
29 } | 34 } |
30 | 35 |
31 android_assets("runtime_library_assets") { | 36 android_assets("runtime_library_assets") { |
32 write_file("$target_gen_dir/webapk_dex_version.txt", runtime_library_version) | 37 write_file("$target_gen_dir/webapk_dex_version.txt", runtime_library_version) |
33 | 38 |
34 sources = [ | 39 sources = [ |
35 "$target_gen_dir/$runtime_library_dex_asset_name", | 40 "$target_gen_dir/$runtime_library_dex_asset_name", |
36 "$target_gen_dir/webapk_dex_version.txt", | 41 "$target_gen_dir/webapk_dex_version.txt", |
37 ] | 42 ] |
38 disable_compression = true | 43 disable_compression = true |
39 | 44 |
40 deps = [ | 45 deps = [ |
41 ":runtime_library_java", | 46 ":runtime_library_java", |
42 ] | 47 ] |
43 } | 48 } |
44 | 49 |
45 junit_binary("webapk_runtime_library_junit_tests") { | 50 junit_binary("webapk_runtime_library_junit_tests") { |
46 java_files = [ "junit/src/org/chromium/webapk/lib/runtime_library/WebApkServic
eImplTest.java" ] | 51 java_files = [ "junit/src/org/chromium/webapk/lib/runtime_library/WebApkServic
eImplTest.java" ] |
47 deps = [ | 52 deps = [ |
48 ":runtime_library_java", | 53 ":runtime_library_java", |
49 "//base:base_junit_test_support", | 54 "//base:base_junit_test_support", |
50 ] | 55 ] |
51 } | 56 } |
OLD | NEW |