blob: ce05c820cbbcdc3faa0c6e7d12b3b9c5971dda50 [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",
Songchun Fan3c82a302019-11-29 14:23:45 -080068 "libvold_binder",
Yurii Zubrytskyi80d0f4c2021-02-26 03:53:04 -050069 "libziparchive_for_incfs",
Songchun Fan3c82a302019-11-29 14:23:45 -080070 ],
71 shared_libs: [
72 "libandroidfw",
73 "libbinder",
Yurii Zubrytskyi4a25dfb2020-01-10 11:53:24 -080074 "libcrypto",
75 "libcutils",
Songchun Fan3c82a302019-11-29 14:23:45 -080076 "libincfs",
77 "liblog",
Steven Moreland3c8c5362021-04-13 01:03:23 +000078 "libpermission",
Pirama Arumuga Nainarcebf0492021-08-25 22:23:41 -070079 "libutils",
Songchun Fan3c82a302019-11-29 14:23:45 -080080 "libz",
Songchun Fan3c82a302019-11-29 14:23:45 -080081 ],
82}
83
84filegroup {
85 name: "service.incremental_srcs",
86 srcs: [
87 "incremental_service.c",
88 "IncrementalService.cpp",
Yurii Zubrytskyi629051fd2020-04-17 23:13:47 -070089 "IncrementalServiceValidation.cpp",
Songchun Fan3c82a302019-11-29 14:23:45 -080090 "BinderIncrementalService.cpp",
91 "path.cpp",
92 "ServiceWrappers.cpp",
93 ],
94}
95
96cc_library {
97 name: "service.incremental",
98 defaults: [
99 "service.incremental-defaults",
Songchun Fan3c82a302019-11-29 14:23:45 -0800100 ],
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",
Songchun Fan0813fb02021-02-22 22:58:55 +0000136 ],
137 test_options: {
138 unit_test: true,
139 },
Songchun Fan3c82a302019-11-29 14:23:45 -0800140}