1// 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
15
16package {
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
25cc_defaults {
26    name: "libincidentpriv_defaults",
27
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",
40        "libprotobuf-cpp-lite",
41    ],
42
43    static_libs: [
44        "libplatformprotos",
45    ],
46
47    whole_static_libs: [
48        "libincidentcompanion",
49    ],
50
51    aidl: {
52        include_dirs: [
53            "frameworks/base/core/java",
54            "frameworks/native/libs/incidentcompanion/binder",
55        ],
56        export_aidl_headers: true,
57    },
58
59    srcs: [
60        ":libincident_aidl",
61        "src/IncidentReportArgs.cpp",
62    ],
63    min_sdk_version: "29",
64}
65
66cc_library_shared {
67    name: "libincidentpriv",
68    defaults: ["libincidentpriv_defaults"],
69    export_include_dirs: ["include_priv"],
70}
71
72cc_library_shared {
73    name: "libincident",
74
75    cflags: [
76        "-Wall",
77        "-Werror",
78        "-Wno-missing-field-initializers",
79        "-Wno-unused-variable",
80        "-Wunused-parameter",
81    ],
82
83    shared_libs: [
84        "libbinder",
85        "liblog",
86        "libutils",
87        "libincidentpriv",
88    ],
89
90    srcs: [
91        "src/incident_report.cpp",
92    ],
93
94    export_include_dirs: ["include"],
95
96    stubs: {
97        symbol_file: "libincident.map.txt",
98        versions: [
99            "30",
100        ],
101    },
102}
103
104cc_test {
105    name: "libincident_test",
106    test_config: "AndroidTest.xml",
107    defaults: ["libincidentpriv_defaults"],
108    test_suites: ["device-tests"],
109    compile_multilib: "both",
110    multilib: {
111        lib64: {
112            suffix: "64",
113        },
114        lib32: {
115            suffix: "32",
116        },
117    },
118    require_root: true,
119
120    include_dirs: [
121        "frameworks/base/libs/incident/include",
122        "frameworks/base/libs/incident/include_priv",
123    ],
124
125    srcs: [
126        "tests/IncidentReportArgs_test.cpp",
127        "tests/IncidentReportRequest_test.cpp",
128    ],
129
130    shared_libs: [
131        "libincident",
132    ],
133
134    static_libs: [
135        "libgmock",
136    ],
137
138    host_required: ["compatibility-tradefed"],
139}
140