Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2017 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
Bob Badour | 051ef78 | 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 | |
Yi Jin | 18678bd | 2018-04-27 11:51:13 -0700 | [diff] [blame] | 24 | cc_defaults { |
| 25 | name: "libprotoutil_defaults", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 26 | |
| 27 | cflags: [ |
| 28 | "-Wall", |
| 29 | "-Werror", |
| 30 | "-Wno-missing-field-initializers", |
| 31 | "-Wno-unused-variable", |
| 32 | "-Wunused-parameter", |
| 33 | ], |
| 34 | |
| 35 | srcs: [ |
| 36 | "src/EncodedBuffer.cpp", |
Joe Onorato | 99598ee | 2019-02-11 15:55:13 +0000 | [diff] [blame] | 37 | "src/ProtoFileReader.cpp", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 38 | "src/ProtoOutputStream.cpp", |
Joe Onorato | 99598ee | 2019-02-11 15:55:13 +0000 | [diff] [blame] | 39 | "src/ProtoReader.cpp", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 40 | "src/protobuf.cpp", |
| 41 | ], |
| 42 | |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 43 | shared_libs: [ |
Yi Jin | c5b71ee | 2018-04-25 16:51:40 -0700 | [diff] [blame] | 44 | "libbase", |
Joe Onorato | 99598ee | 2019-02-11 15:55:13 +0000 | [diff] [blame] | 45 | "libutils", |
Yi Jin | 04625ad | 2017-10-17 18:29:33 -0700 | [diff] [blame] | 46 | "libcutils", |
| 47 | "liblog", |
| 48 | ], |
| 49 | } |
Yi Jin | ad3e6e5 | 2018-04-03 15:10:34 -0700 | [diff] [blame] | 50 | |
Yi Jin | 18678bd | 2018-04-27 11:51:13 -0700 | [diff] [blame] | 51 | cc_library { |
| 52 | name: "libprotoutil", |
| 53 | |
| 54 | defaults: ["libprotoutil_defaults"], |
| 55 | |
| 56 | export_include_dirs: ["include"], |
Jeffrey Huang | 260613f | 2020-02-14 10:08:22 -0800 | [diff] [blame] | 57 | |
| 58 | apex_available: [ |
| 59 | "//apex_available:platform", |
| 60 | "com.android.os.statsd", |
| 61 | "test_com.android.os.statsd", |
| 62 | ], |
Yi Jin | 18678bd | 2018-04-27 11:51:13 -0700 | [diff] [blame] | 63 | } |
| 64 | |
Yi Jin | ad3e6e5 | 2018-04-03 15:10:34 -0700 | [diff] [blame] | 65 | cc_test { |
| 66 | name: "libprotoutil_test", |
| 67 | |
Yi Jin | 18678bd | 2018-04-27 11:51:13 -0700 | [diff] [blame] | 68 | defaults: ["libprotoutil_defaults"], |
| 69 | |
| 70 | local_include_dirs: ["include"], |
| 71 | |
Yi Jin | c3d4b28 | 2018-04-23 16:02:20 -0700 | [diff] [blame] | 72 | srcs: ["tests/*"], |
Yi Jin | ad3e6e5 | 2018-04-03 15:10:34 -0700 | [diff] [blame] | 73 | |
| 74 | shared_libs: [ |
Yi Jin | c3d4b28 | 2018-04-23 16:02:20 -0700 | [diff] [blame] | 75 | "libprotobuf-cpp-full", |
Yi Jin | ad3e6e5 | 2018-04-03 15:10:34 -0700 | [diff] [blame] | 76 | ], |
| 77 | |
| 78 | static_libs: [ |
| 79 | "libgmock", |
| 80 | ], |
Yi Jin | c3d4b28 | 2018-04-23 16:02:20 -0700 | [diff] [blame] | 81 | |
| 82 | proto: { |
| 83 | type: "full", |
| 84 | } |
Yi Jin | ad3e6e5 | 2018-04-03 15:10:34 -0700 | [diff] [blame] | 85 | } |