xref: /aosp_15_r20/frameworks/base/services/incremental/Android.bp (revision d57664e9bc4670b3ecf6748a746a57c557b6bc9e)
1// Copyright 2019, 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
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "frameworks_base_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["frameworks_base_license"],
22}
23
24cc_defaults {
25    name: "service.incremental-proto-defaults",
26
27    cpp_std: "c++2a",
28    proto: {
29        type: "lite",
30    },
31    tidy: true,
32    tidy_checks: [
33        "android-*",
34        "cert-*",
35        "clang-analyzer-security*",
36        "-cert-err34-c",
37        "clang-analyzer-security*",
38        // Disabling due to many unavoidable warnings from POSIX API usage.
39        "-google-runtime-int",
40        "-google-explicit-constructor",
41        // do not define variadic C function - JNI headers
42        "-cert-dcl50-cpp",
43        // operator=() does not handle self-assignment properly - all protobuf-generated classes
44        "-cert-oop54-cpp",
45    ],
46}
47
48cc_defaults {
49    name: "service.incremental-defaults",
50    defaults: ["service.incremental-proto-defaults"],
51    header_libs: ["jni_headers"],
52    local_include_dirs: ["include/"],
53    cflags: [
54        "-Wall",
55        "-Werror",
56        "-Wextra",
57        "-Wno-unused-parameter",
58    ],
59
60    static_libs: [
61        "libbase",
62        "libext2_uuid",
63        "libdataloader_aidl-cpp",
64        "libincremental_aidl-cpp",
65        "libincremental_manager_aidl-cpp",
66        "libprotobuf-cpp-lite",
67        "service.incremental.proto",
68        "libvold_binder",
69        "libziparchive_for_incfs",
70    ],
71    shared_libs: [
72        "libandroidfw",
73        "libbinder",
74        "libcrypto",
75        "libcutils",
76        "libincfs",
77        "liblog",
78        "libpermission",
79        "libutils",
80        "libz",
81    ],
82}
83
84filegroup {
85    name: "service.incremental_srcs",
86    srcs: [
87        "incremental_service.c",
88        "IncrementalService.cpp",
89        "IncrementalServiceValidation.cpp",
90        "BinderIncrementalService.cpp",
91        "path.cpp",
92        "ServiceWrappers.cpp",
93    ],
94}
95
96cc_library {
97    name: "service.incremental",
98    defaults: [
99        "service.incremental-defaults",
100    ],
101
102    export_include_dirs: ["include/",],
103    srcs: [
104        ":service.incremental_srcs",
105    ],
106}
107
108cc_library_headers {
109    name: "service.incremental_headers",
110    export_include_dirs: ["include/",],
111}
112
113cc_library_static {
114    name: "service.incremental.proto",
115    defaults: ["service.incremental-proto-defaults"],
116    proto: {
117        export_proto_headers: true,
118    },
119
120    srcs: [
121        "Metadata.proto",
122    ],
123}
124
125cc_test {
126    name: "service.incremental_test",
127    defaults: ["service.incremental-defaults"],
128    test_suites: ["device-tests"],
129    srcs: [
130        ":service.incremental_srcs",
131        "test/IncrementalServiceTest.cpp",
132        "test/path_test.cpp",
133    ],
134    static_libs: [
135        "libgmock",
136    ],
137    test_options: {
138        unit_test: true,
139    },
140}
141