Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 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 | |
| 15 | cc_defaults { |
| 16 | name: "service.incremental-proto-defaults", |
| 17 | |
| 18 | cpp_std: "c++2a", |
| 19 | proto: { |
| 20 | type: "lite", |
| 21 | }, |
Yurii Zubrytskyi | 510037b | 2020-04-22 15:46:21 -0700 | [diff] [blame] | 22 | 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 Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | cc_defaults { |
| 40 | name: "service.incremental-defaults", |
| 41 | defaults: ["service.incremental-proto-defaults"], |
Orion Hodson | 8c238ba | 2020-05-18 10:15:23 +0100 | [diff] [blame^] | 42 | header_libs: ["jni_headers"], |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 43 | local_include_dirs: ["include/"], |
| 44 | cflags: [ |
| 45 | "-Wall", |
| 46 | "-Werror", |
| 47 | "-Wextra", |
| 48 | "-Wno-unused-parameter", |
| 49 | ], |
| 50 | |
| 51 | static_libs: [ |
| 52 | "libbase", |
| 53 | "libext2_uuid", |
| 54 | "libdataloader_aidl-cpp", |
| 55 | "libincremental_aidl-cpp", |
| 56 | "libincremental_manager_aidl-cpp", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 57 | "libprotobuf-cpp-lite", |
| 58 | "service.incremental.proto", |
| 59 | "libutils", |
| 60 | "libvold_binder", |
Songchun Fan | 1124fd3 | 2020-02-10 12:49:41 -0800 | [diff] [blame] | 61 | "libc++fs", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 62 | ], |
| 63 | shared_libs: [ |
| 64 | "libandroidfw", |
| 65 | "libbinder", |
Yurii Zubrytskyi | 4a25dfb | 2020-01-10 11:53:24 -0800 | [diff] [blame] | 66 | "libcrypto", |
| 67 | "libcutils", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 68 | "libincfs", |
| 69 | "liblog", |
| 70 | "libz", |
| 71 | "libziparchive", |
| 72 | ], |
| 73 | } |
| 74 | |
| 75 | filegroup { |
| 76 | name: "service.incremental_srcs", |
| 77 | srcs: [ |
| 78 | "incremental_service.c", |
| 79 | "IncrementalService.cpp", |
Yurii Zubrytskyi | 629051fd | 2020-04-17 23:13:47 -0700 | [diff] [blame] | 80 | "IncrementalServiceValidation.cpp", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 81 | "BinderIncrementalService.cpp", |
| 82 | "path.cpp", |
| 83 | "ServiceWrappers.cpp", |
| 84 | ], |
| 85 | } |
| 86 | |
| 87 | cc_library { |
| 88 | name: "service.incremental", |
| 89 | defaults: [ |
| 90 | "service.incremental-defaults", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 91 | ], |
| 92 | |
| 93 | export_include_dirs: ["include/",], |
| 94 | srcs: [ |
| 95 | ":service.incremental_srcs", |
| 96 | ], |
| 97 | } |
| 98 | |
| 99 | cc_library_headers { |
| 100 | name: "service.incremental_headers", |
| 101 | export_include_dirs: ["include/",], |
| 102 | } |
| 103 | |
| 104 | cc_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 | |
| 116 | cc_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 | } |