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 | |
Bob Badour | 8a6a2bc | 2021-02-12 17:07:05 -0800 | [diff] [blame] | 15 | package { |
| 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 Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "service.incremental-proto-defaults", |
| 26 | |
| 27 | cpp_std: "c++2a", |
| 28 | proto: { |
| 29 | type: "lite", |
| 30 | }, |
Yurii Zubrytskyi | 510037b | 2020-04-22 15:46:21 -0700 | [diff] [blame] | 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 | ], |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | cc_defaults { |
| 49 | name: "service.incremental-defaults", |
| 50 | defaults: ["service.incremental-proto-defaults"], |
Orion Hodson | 8c238ba | 2020-05-18 10:15:23 +0100 | [diff] [blame] | 51 | header_libs: ["jni_headers"], |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 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", |
Jeongik Cha | 969b921 | 2021-01-28 00:49:47 +0900 | [diff] [blame] | 63 | "libdataloader_aidl-cpp", |
| 64 | "libincremental_aidl-cpp", |
| 65 | "libincremental_manager_aidl-cpp", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 66 | "libprotobuf-cpp-lite", |
| 67 | "service.incremental.proto", |
| 68 | "libutils", |
| 69 | "libvold_binder", |
Songchun Fan | 1124fd3 | 2020-02-10 12:49:41 -0800 | [diff] [blame] | 70 | "libc++fs", |
Yurii Zubrytskyi | 80d0f4c | 2021-02-26 03:53:04 -0500 | [diff] [blame] | 71 | "libziparchive_for_incfs", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 72 | ], |
| 73 | shared_libs: [ |
| 74 | "libandroidfw", |
| 75 | "libbinder", |
Yurii Zubrytskyi | 4a25dfb | 2020-01-10 11:53:24 -0800 | [diff] [blame] | 76 | "libcrypto", |
| 77 | "libcutils", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 78 | "libincfs", |
| 79 | "liblog", |
Steven Moreland | 3c8c536 | 2021-04-13 01:03:23 +0000 | [diff] [blame] | 80 | "libpermission", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 81 | "libz", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 82 | ], |
| 83 | } |
| 84 | |
| 85 | filegroup { |
| 86 | name: "service.incremental_srcs", |
| 87 | srcs: [ |
| 88 | "incremental_service.c", |
| 89 | "IncrementalService.cpp", |
Yurii Zubrytskyi | 629051fd | 2020-04-17 23:13:47 -0700 | [diff] [blame] | 90 | "IncrementalServiceValidation.cpp", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 91 | "BinderIncrementalService.cpp", |
| 92 | "path.cpp", |
| 93 | "ServiceWrappers.cpp", |
| 94 | ], |
| 95 | } |
| 96 | |
| 97 | cc_library { |
| 98 | name: "service.incremental", |
| 99 | defaults: [ |
| 100 | "service.incremental-defaults", |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 101 | ], |
| 102 | |
| 103 | export_include_dirs: ["include/",], |
| 104 | srcs: [ |
| 105 | ":service.incremental_srcs", |
| 106 | ], |
| 107 | } |
| 108 | |
| 109 | cc_library_headers { |
| 110 | name: "service.incremental_headers", |
| 111 | export_include_dirs: ["include/",], |
| 112 | } |
| 113 | |
| 114 | cc_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 | |
| 126 | cc_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", |
Songchun Fan | 0813fb0 | 2021-02-22 22:58:55 +0000 | [diff] [blame] | 137 | ], |
| 138 | test_options: { |
| 139 | unit_test: true, |
| 140 | }, |
Songchun Fan | 3c82a30 | 2019-11-29 14:23:45 -0800 | [diff] [blame] | 141 | } |