blob: ff1714da20082152358cec5ca7b3c43e554ca7b2 [file] [log] [blame]
Colin Crossbc2dc312018-10-26 22:34:06 -07001// Copyright (C) 2016 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Joe Onorato255ffff2020-01-17 01:30:02 -080015
Bob Badour8a6a2bc2021-02-12 17:07:05 -080016package {
17 // See: http://go/android-license-faq
18 // A large-scale-change added 'default_applicable_licenses' to import
19 // all of the 'license_kinds' from "frameworks_base_license"
20 // to get the below license kinds:
21 // SPDX-license-identifier-Apache-2.0
22 default_applicable_licenses: ["frameworks_base_license"],
23}
24
Joe Onorato255ffff2020-01-17 01:30:02 -080025cc_defaults {
26 name: "libincidentpriv_defaults",
Colin Crossbc2dc312018-10-26 22:34:06 -070027
28 cflags: [
29 "-Wall",
30 "-Werror",
31 "-Wno-missing-field-initializers",
32 "-Wno-unused-variable",
33 "-Wunused-parameter",
34 ],
35
36 shared_libs: [
37 "libbinder",
38 "liblog",
39 "libutils",
Joe Onorato99598ee2019-02-11 15:55:13 +000040 "libprotobuf-cpp-lite",
41 ],
42
43 static_libs: [
44 "libplatformprotos",
45 ],
46
47 whole_static_libs: [
48 "libincidentcompanion",
Colin Crossbc2dc312018-10-26 22:34:06 -070049 ],
50
51 aidl: {
Joe Onorato99598ee2019-02-11 15:55:13 +000052 include_dirs: [
53 "frameworks/base/core/java",
54 "frameworks/native/libs/incidentcompanion/binder",
55 ],
Colin Crossbc2dc312018-10-26 22:34:06 -070056 export_aidl_headers: true,
57 },
58
59 srcs: [
60 ":libincident_aidl",
Colin Crossbc2dc312018-10-26 22:34:06 -070061 "src/IncidentReportArgs.cpp",
62 ],
Joe Onorato255ffff2020-01-17 01:30:02 -080063}
64
65cc_library_shared {
66 name: "libincidentpriv",
67 defaults: ["libincidentpriv_defaults"],
68 export_include_dirs: ["include_priv"],
69}
70
71cc_library_shared {
72 name: "libincident",
73
74 cflags: [
75 "-Wall",
76 "-Werror",
77 "-Wno-missing-field-initializers",
78 "-Wno-unused-variable",
79 "-Wunused-parameter",
80 ],
81
82 shared_libs: [
83 "libbinder",
84 "liblog",
85 "libutils",
86 "libincidentpriv",
87 ],
88
89 srcs: [
90 "src/incident_report.cpp",
91 ],
Colin Crossbc2dc312018-10-26 22:34:06 -070092
Colin Crossbc2dc312018-10-26 22:34:06 -070093 export_include_dirs: ["include"],
Joe Onorato255ffff2020-01-17 01:30:02 -080094
95 stubs: {
96 symbol_file: "libincident.map.txt",
97 versions: [
98 "30",
99 ],
100 },
Joe Onorato99598ee2019-02-11 15:55:13 +0000101}
Joe Onorato255ffff2020-01-17 01:30:02 -0800102
103cc_test {
104 name: "libincident_test",
Joe Onorato084aa3c2020-03-20 16:25:14 -0700105 test_config: "AndroidTest.xml",
Joe Onorato255ffff2020-01-17 01:30:02 -0800106 defaults: ["libincidentpriv_defaults"],
Jeffrey Huangd5fdf1e2021-04-23 11:52:40 -0700107 test_suites: ["device-tests"],
Ruchir Rastogidd5d2872020-06-09 17:22:53 -0700108 compile_multilib: "both",
109 multilib: {
110 lib64: {
111 suffix: "64",
112 },
113 lib32: {
114 suffix: "32",
115 },
116 },
117 require_root: true,
Joe Onorato255ffff2020-01-17 01:30:02 -0800118
119 include_dirs: [
120 "frameworks/base/libs/incident/include",
121 "frameworks/base/libs/incident/include_priv",
122 ],
123
124 srcs: [
125 "tests/IncidentReportArgs_test.cpp",
126 "tests/IncidentReportRequest_test.cpp",
Joe Onorato255ffff2020-01-17 01:30:02 -0800127 ],
128
129 shared_libs: [
130 "libincident",
131 ],
132
133 static_libs: [
134 "libgmock",
135 ],
Yikeba210892022-09-30 10:34:57 +0800136
137 host_required: ["compatibility-tradefed"],
Joe Onorato255ffff2020-01-17 01:30:02 -0800138}