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 "libc++fs", 70 "libziparchive_for_incfs", 71 ], 72 shared_libs: [ 73 "libandroidfw", 74 "libbinder", 75 "libcrypto", 76 "libcutils", 77 "libincfs", 78 "liblog", 79 "libpermission", 80 "libutils", 81 "libz", 82 ], 83} 84 85filegroup { 86 name: "service.incremental_srcs", 87 srcs: [ 88 "incremental_service.c", 89 "IncrementalService.cpp", 90 "IncrementalServiceValidation.cpp", 91 "BinderIncrementalService.cpp", 92 "path.cpp", 93 "ServiceWrappers.cpp", 94 ], 95} 96 97cc_library { 98 name: "service.incremental", 99 defaults: [ 100 "service.incremental-defaults", 101 ], 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", 137 ], 138 test_options: { 139 unit_test: true, 140 }, 141} 142