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

Side by Side Diff: chrome/android/webapk/libs/runtime_library/BUILD.gn

Issue 2182133004: Making webapk service java appear in only one .jar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing checkdeps Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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 # A standalone jar for the aidl's generated java files so that multiple places
25 # can depend on the aidl.
26 android_library("webapk_service_aidl_java") {
27 srcjar_deps = [ ":webapk_service_aidl" ]
28 }
29
24 # runtime_library_from_assets_java cannot be used as a dependency of another 30 # runtime_library_from_assets_java cannot be used as a dependency of another
25 # library because the dx tool expects files ending in .dex.jar 31 # library because the dx tool expects files ending in .dex.jar
26 android_library("runtime_library_for_assets_java") { 32 android_library("runtime_library_for_assets_java") {
27 dex_path = "$target_gen_dir/$runtime_library_dex_asset_name" 33 dex_path = "$target_gen_dir/$runtime_library_dex_asset_name"
28 java_files = [ 34 java_files = [
29 "src/org/chromium/webapk/lib/runtime_library/HostBrowserLauncher.java", 35 "src/org/chromium/webapk/lib/runtime_library/HostBrowserLauncher.java",
30 "src/org/chromium/webapk/lib/runtime_library/WebApkServiceImpl.java", 36 "src/org/chromium/webapk/lib/runtime_library/WebApkServiceImpl.java",
31 ] 37 ]
32 srcjar_deps = [ ":webapk_service_aidl" ]
33 deps = [ 38 deps = [
39 ":webapk_service_aidl_java",
34 "//chrome/android/webapk/libs/common:common_java", 40 "//chrome/android/webapk/libs/common:common_java",
35 ] 41 ]
36 } 42 }
37 43
38 # The subset of runtime_library_from_assets_java needed for tests. 44 # The subset of runtime_library_from_assets_java needed for tests.
39 android_library("runtime_library_for_tests_java") { 45 android_library("runtime_library_for_tests_java") {
40 java_files = 46 java_files =
41 [ "src/org/chromium/webapk/lib/runtime_library/WebApkServiceImpl.java" ] 47 [ "src/org/chromium/webapk/lib/runtime_library/WebApkServiceImpl.java" ]
42 srcjar_deps = [ ":webapk_service_aidl" ] 48 deps = [
49 ":webapk_service_aidl_java",
50 ]
43 } 51 }
44 52
45 android_assets("runtime_library_assets") { 53 android_assets("runtime_library_assets") {
46 write_file("$target_gen_dir/webapk_dex_version.txt", runtime_library_version) 54 write_file("$target_gen_dir/webapk_dex_version.txt", runtime_library_version)
47 55
48 sources = [ 56 sources = [
49 "$target_gen_dir/$runtime_library_dex_asset_name", 57 "$target_gen_dir/$runtime_library_dex_asset_name",
50 "$target_gen_dir/webapk_dex_version.txt", 58 "$target_gen_dir/webapk_dex_version.txt",
51 ] 59 ]
52 disable_compression = true 60 disable_compression = true
53 61
54 deps = [ 62 deps = [
55 ":runtime_library_for_assets_java", 63 ":runtime_library_for_assets_java",
56 ] 64 ]
57 } 65 }
58 66
59 android_library("runtime_library_javatests") { 67 android_library("runtime_library_javatests") {
60 testonly = true 68 testonly = true
61 java_files = [ "javatests/src/org/chromium/webapk/lib/runtime_library/WebApkSe rviceImplTest.java" ] 69 java_files = [ "javatests/src/org/chromium/webapk/lib/runtime_library/WebApkSe rviceImplTest.java" ]
62 deps = [ 70 deps = [
63 ":runtime_library_for_tests_java", 71 ":runtime_library_for_tests_java",
72 ":webapk_service_aidl_java",
64 "//base:base_java_test_support", 73 "//base:base_java_test_support",
65 "//chrome/test/android:chrome_java_test_support", 74 "//chrome/test/android:chrome_java_test_support",
66 "//content/public/test/android:content_java_test_support", 75 "//content/public/test/android:content_java_test_support",
67 ] 76 ]
68 } 77 }
OLDNEW
« no previous file with comments | « chrome/android/webapk/libs/client/BUILD.gn ('k') | chrome/android/webapk/libs/runtime_library/javatests/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698