blob: 0bd737bec460603c5db9cfef83c143bb4d3bb0c6 [file] [log] [blame]
Songchun Fan3c82a302019-11-29 14:23:45 -08001// 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
Bob Badour8a6a2bc2021-02-12 17:07:05 -080015package {
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
Songchun Fan3c82a302019-11-29 14:23:45 -080024cc_defaults {
25 name: "service.incremental-proto-defaults",
26
27 cpp_std: "c++2a",
28 proto: {
29 type: "lite",
30 },
Yurii Zubrytskyi510037b2020-04-22 15:46:21 -070031 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 ],
Songchun Fan3c82a302019-11-29 14:23:45 -080046}
47
48cc_defaults {
49 name: "service.incremental-defaults",
50 defaults: ["service.incremental-proto-defaults"],
Orion Hodson8c238ba2020-05-18 10:15:23 +010051 header_libs: ["jni_headers"],
Songchun Fan3c82a302019-11-29 14:23:45 -080052 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",
Jeongik Cha969b9212021-01-28 00:49:47 +090063 "libdataloader_aidl-cpp",
64 "libincremental_aidl-cpp",
65 "libincremental_manager_aidl-cpp",
Songchun Fan3c82a302019-11-29 14:23:45 -080066 "libprotobuf-cpp-lite",
67 "service.incremental.proto",
68 "libutils",
69 "libvold_binder",
Songchun Fan1124fd32020-02-10 12:49:41 -080070 "libc++fs",
Yurii Zubrytskyi80d0f4c2021-02-26 03:53:04 -050071 "libziparchive_for_incfs",
Songchun Fan3c82a302019-11-29 14:23:45 -080072 ],
73 shared_libs: [
74 "libandroidfw",
75 "libbinder",
Yurii Zubrytskyi4a25dfb2020-01-10 11:53:24 -080076 "libcrypto",
77 "libcutils",
Songchun Fan3c82a302019-11-29 14:23:45 -080078 "libincfs",
79 "liblog",
Steven Moreland3c8c5362021-04-13 01:03:23 +000080 "libpermission",
Songchun Fan3c82a302019-11-29 14:23:45 -080081 "libz",
Songchun Fan3c82a302019-11-29 14:23:45 -080082 ],
83}
84
85filegroup {
86 name: "service.incremental_srcs",
87 srcs: [
88 "incremental_service.c",
89 "IncrementalService.cpp",
Yurii Zubrytskyi629051fd2020-04-17 23:13:47 -070090 "IncrementalServiceValidation.cpp",
Songchun Fan3c82a302019-11-29 14:23:45 -080091 "BinderIncrementalService.cpp",
92 "path.cpp",
93 "ServiceWrappers.cpp",
94 ],
95}
96
97cc_library {
98 name: "service.incremental",
99 defaults: [
100 "service.incremental-defaults",
Songchun Fan3c82a302019-11-29 14:23:45 -0800101 ],
102
103 export_include_dirs: ["include/",],
104 srcs: [
105 ":service.incremental_srcs",
106 ],
107}
108
109cc_library_headers {
110 name: "service.incremental_headers",
111 export_include_dirs: ["include/",],
112}
113
114cc_library_static {
115 name: "service.incremental.proto",
116 defaults: ["service.incremental-proto-defaults"],
117 proto: {
118 export_proto_headers: true,
119 },
120
121 srcs: [
122 "Metadata.proto",
123 ],
124}
125
126cc_test {
127 name: "service.incremental_test",
128 defaults: ["service.incremental-defaults"],
129 test_suites: ["device-tests"],
130 srcs: [
131 ":service.incremental_srcs",
132 "test/IncrementalServiceTest.cpp",
133 "test/path_test.cpp",
134 ],
135 static_libs: [
136 "libgmock",
Songchun Fan0813fb02021-02-22 22:58:55 +0000137 ],
138 test_options: {
139 unit_test: true,
140 },
Songchun Fan3c82a302019-11-29 14:23:45 -0800141}