blob: de639c5d0760a392de25838fe1a82148c9d091df [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",
56 "libnativehelper",
57 "libprotobuf-cpp-lite",
58 "service.incremental.proto",
59 "libutils",
60 "libvold_binder",
Songchun Fan1124fd32020-02-10 12:49:41 -080061 "libc++fs",
Songchun Fan3c82a302019-11-29 14:23:45 -080062 ],
63 shared_libs: [
64 "libandroidfw",
65 "libbinder",
Yurii Zubrytskyi4a25dfb2020-01-10 11:53:24 -080066 "libcrypto",
67 "libcutils",
Songchun Fan3c82a302019-11-29 14:23:45 -080068 "libincfs",
69 "liblog",
70 "libz",
71 "libziparchive",
72 ],
73}
74
75filegroup {
76 name: "service.incremental_srcs",
77 srcs: [
78 "incremental_service.c",
79 "IncrementalService.cpp",
Yurii Zubrytskyi629051fd2020-04-17 23:13:47 -070080 "IncrementalServiceValidation.cpp",
Songchun Fan3c82a302019-11-29 14:23:45 -080081 "BinderIncrementalService.cpp",
82 "path.cpp",
83 "ServiceWrappers.cpp",
84 ],
85}
86
87cc_library {
88 name: "service.incremental",
89 defaults: [
90 "service.incremental-defaults",
Songchun Fan3c82a302019-11-29 14:23:45 -080091 ],
92
93 export_include_dirs: ["include/",],
94 srcs: [
95 ":service.incremental_srcs",
96 ],
97}
98
99cc_library_headers {
100 name: "service.incremental_headers",
101 export_include_dirs: ["include/",],
102}
103
104cc_library_static {
105 name: "service.incremental.proto",
106 defaults: ["service.incremental-proto-defaults"],
107 proto: {
108 export_proto_headers: true,
109 },
110
111 srcs: [
112 "Metadata.proto",
113 ],
114}
115
116cc_test {
117 name: "service.incremental_test",
118 defaults: ["service.incremental-defaults"],
119 test_suites: ["device-tests"],
120 srcs: [
121 ":service.incremental_srcs",
122 "test/IncrementalServiceTest.cpp",
123 "test/path_test.cpp",
124 ],
125 static_libs: [
126 "libgmock",
127 ]
128}