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}
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    ],
92
93    export_include_dirs: ["include"],
94
95    stubs: {
96        symbol_file: "libincident.map.txt",
97        versions: [
98            "30",
99        ],
100    },
101}
102
103cc_test {
104    name: "libincident_test",
105    test_config: "AndroidTest.xml",
106    defaults: ["libincidentpriv_defaults"],
107    test_suites: ["device-tests"],
108    compile_multilib: "both",
109    multilib: {
110        lib64: {
111            suffix: "64",
112        },
113        lib32: {
114            suffix: "32",
115        },
116    },
117    require_root: true,
118
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",
127    ],
128
129    shared_libs: [
130        "libincident",
131    ],
132
133    static_libs: [
134        "libgmock",
135    ],
136}
137