blob: cb07d35363725b78551217538a3575e57d32ce75 [file] [log] [blame]
Bob Badour9150de62021-02-26 03:22:24 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "art_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["art_license"],
8}
9
Orion Hodson9b16e342019-10-09 13:29:16 +010010cc_defaults {
11 name: "libnativebridge-defaults",
Martin Stjernholm3bb009a2019-10-17 21:29:01 +010012 defaults: ["art_defaults"],
Orion Hodson9b16e342019-10-09 13:29:16 +010013 cppflags: [
14 "-fvisibility=protected",
15 ],
Orion Hodson00cb81d2020-04-03 06:47:07 +010016 header_libs: [
17 "jni_headers",
18 "libnativebridge-headers",
19 ],
20 export_header_lib_headers: [
21 "jni_headers",
22 "libnativebridge-headers",
23 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010024}
25
26cc_library_headers {
27 name: "libnativebridge-headers",
28
29 host_supported: true,
30 export_include_dirs: ["include"],
Jiyong Park71f661c2020-04-28 18:20:43 +090031
32 apex_available: [
33 "//apex_available:platform",
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +010034 "com.android.art",
Jiyong Park71f661c2020-04-28 18:20:43 +090035 "com.android.art.debug",
Martin Stjernholm694f0122020-10-30 02:23:24 +000036 "com.android.media",
Jiyong Park71f661c2020-04-28 18:20:43 +090037 ],
Nicolas Geoffrayec388c02021-03-03 22:09:06 +000038 min_sdk_version: "S",
Orion Hodson9b16e342019-10-09 13:29:16 +010039}
40
David Srbecky1cf46a32020-06-22 15:39:00 +010041art_cc_library {
Orion Hodson9b16e342019-10-09 13:29:16 +010042 name: "libnativebridge",
43 defaults: ["libnativebridge-defaults"],
Orion Hodsonc78860b2019-10-11 11:30:01 +010044 visibility: [
Orion Hodsonc78860b2019-10-11 11:30:01 +010045 "//frameworks/base/cmds/app_process",
Martin Stjernholm3bb009a2019-10-17 21:29:01 +010046 // TODO(b/133140750): Clean this up.
Orion Hodsonc78860b2019-10-11 11:30:01 +010047 "//frameworks/base/native/webview/loader/libwebviewchromium_loader",
48 ],
Jiyong Park066dd9022019-12-19 02:11:59 +000049 apex_available: [
Martin Stjernholm3e9abfc2020-10-09 22:17:51 +010050 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +000051 "com.android.art.debug",
52 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010053
54 host_supported: true,
55 srcs: ["native_bridge.cc"],
56 header_libs: [
57 "libbase_headers",
58 ],
59 shared_libs: [
60 "liblog",
61 ],
62 // TODO(jiyong): remove this line after aosp/885921 lands
63 export_include_dirs: ["include"],
64
65 target: {
66 android: {
67 version_script: "libnativebridge.map.txt",
68 },
69 linux: {
70 version_script: "libnativebridge.map.txt",
71 },
72 },
73
74 stubs: {
75 symbol_file: "libnativebridge.map.txt",
76 versions: ["1"],
77 },
78}
79
80// TODO(b/124250621): eliminate the need for this library
81cc_library {
82 name: "libnativebridge_lazy",
83 defaults: ["libnativebridge-defaults"],
Orion Hodsonc78860b2019-10-11 11:30:01 +010084 visibility: [
85 "//art/libnativebridge/tests",
86 "//frameworks/base/core/jni",
87 "//frameworks/native/opengl/libs",
88 "//frameworks/native/vulkan/libvulkan",
89 ],
Martin Stjernholmb5ed3302020-10-30 02:27:23 +000090 apex_available: [
91 "//apex_available:platform",
Martin Stjernholm694f0122020-10-30 02:23:24 +000092 "com.android.media",
93 "com.android.media.swcodec",
Martin Stjernholmb5ed3302020-10-30 02:27:23 +000094 ],
Orion Hodson9b16e342019-10-09 13:29:16 +010095
96 host_supported: false,
97 srcs: ["native_bridge_lazy.cc"],
Martin Stjernholmb5ed3302020-10-30 02:27:23 +000098 runtime_libs: ["libnativebridge"],
Mitch Phillips5472d6f2020-07-01 09:43:16 -070099 shared_libs: ["liblog"],
Orion Hodson9b16e342019-10-09 13:29:16 +0100100}
101
102subdirs = ["tests"]