blob: 1a828a9567b48a82a4d47b7dfee7fc4ec1cbb8ee [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
15cc_defaults {
16 name: "service.incremental-proto-defaults",
17
18 cpp_std: "c++2a",
19 proto: {
20 type: "lite",
21 },
Yurii Zubrytskyi510037b2020-04-22 15:46:21 -070022 tidy: true,
23 tidy_checks: [
24 "android-*",
25 "cert-*",
26 "clang-analyzer-security*",
27 "-cert-err34-c",
28 "clang-analyzer-security*",
29 // Disabling due to many unavoidable warnings from POSIX API usage.
30 "-google-runtime-int",
31 "-google-explicit-constructor",
32 // do not define variadic C function - JNI headers
33 "-cert-dcl50-cpp",
34 // operator=() does not handle self-assignment properly - all protobuf-generated classes
35 "-cert-oop54-cpp",
36 ],
Songchun Fan3c82a302019-11-29 14:23:45 -080037}
38
39cc_defaults {
40 name: "service.incremental-defaults",
41 defaults: ["service.incremental-proto-defaults"],
42 local_include_dirs: ["include/"],
43 cflags: [
44 "-Wall",
45 "-Werror",
46 "-Wextra",
47 "-Wno-unused-parameter",
48 ],
49
50 static_libs: [
51 "libbase",
52 "libext2_uuid",
53 "libdataloader_aidl-cpp",
54 "libincremental_aidl-cpp",
55 "libincremental_manager_aidl-cpp",
Songchun Fan3c82a302019-11-29 14:23:45 -080056 "libprotobuf-cpp-lite",
57 "service.incremental.proto",
58 "libutils",
59 "libvold_binder",
Songchun Fan1124fd32020-02-10 12:49:41 -080060 "libc++fs",
Songchun Fan3c82a302019-11-29 14:23:45 -080061 ],
62 shared_libs: [
63 "libandroidfw",
64 "libbinder",
Yurii Zubrytskyi4a25dfb2020-01-10 11:53:24 -080065 "libcrypto",
66 "libcutils",
Songchun Fan3c82a302019-11-29 14:23:45 -080067 "libincfs",
68 "liblog",
69 "libz",
70 "libziparchive",
71 ],
72}
73
74filegroup {
75 name: "service.incremental_srcs",
76 srcs: [
77 "incremental_service.c",
78 "IncrementalService.cpp",
Yurii Zubrytskyi629051fd2020-04-17 23:13:47 -070079 "IncrementalServiceValidation.cpp",
Songchun Fan3c82a302019-11-29 14:23:45 -080080 "BinderIncrementalService.cpp",
81 "path.cpp",
82 "ServiceWrappers.cpp",
83 ],
84}
85
86cc_library {
87 name: "service.incremental",
88 defaults: [
89 "service.incremental-defaults",
Songchun Fan3c82a302019-11-29 14:23:45 -080090 ],
91
92 export_include_dirs: ["include/",],
93 srcs: [
94 ":service.incremental_srcs",
95 ],
96}
97
98cc_library_headers {
99 name: "service.incremental_headers",
100 export_include_dirs: ["include/",],
101}
102
103cc_library_static {
104 name: "service.incremental.proto",
105 defaults: ["service.incremental-proto-defaults"],
106 proto: {
107 export_proto_headers: true,
108 },
109
110 srcs: [
111 "Metadata.proto",
112 ],
113}
114
115cc_test {
116 name: "service.incremental_test",
117 defaults: ["service.incremental-defaults"],
118 test_suites: ["device-tests"],
119 srcs: [
120 ":service.incremental_srcs",
121 "test/IncrementalServiceTest.cpp",
122 "test/path_test.cpp",
123 ],
124 static_libs: [
125 "libgmock",
126 ]
127}