blob: 8af4b7e8f4c826c0626ac639f02f50c5dbaa00fa [file] [log] [blame]
Yi Jin04625ad2017-10-17 18:29:33 -07001//
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 Badour051ef782021-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
Yi Jin18678bd2018-04-27 11:51:13 -070024cc_defaults {
25 name: "libprotoutil_defaults",
Yi Jin04625ad2017-10-17 18:29:33 -070026
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 Onorato99598ee2019-02-11 15:55:13 +000037 "src/ProtoFileReader.cpp",
Yi Jin04625ad2017-10-17 18:29:33 -070038 "src/ProtoOutputStream.cpp",
Joe Onorato99598ee2019-02-11 15:55:13 +000039 "src/ProtoReader.cpp",
Yi Jin04625ad2017-10-17 18:29:33 -070040 "src/protobuf.cpp",
41 ],
42
Yi Jin04625ad2017-10-17 18:29:33 -070043 shared_libs: [
Yi Jinc5b71ee2018-04-25 16:51:40 -070044 "libbase",
Joe Onorato99598ee2019-02-11 15:55:13 +000045 "libutils",
Yi Jin04625ad2017-10-17 18:29:33 -070046 "libcutils",
47 "liblog",
48 ],
49}
Yi Jinad3e6e52018-04-03 15:10:34 -070050
Yi Jin18678bd2018-04-27 11:51:13 -070051cc_library {
52 name: "libprotoutil",
53
54 defaults: ["libprotoutil_defaults"],
55
56 export_include_dirs: ["include"],
Jeffrey Huang260613f2020-02-14 10:08:22 -080057
Jooyung Han907d7162022-06-24 14:56:23 +090058 min_sdk_version: "30",
Jeffrey Huang260613f2020-02-14 10:08:22 -080059 apex_available: [
60 "//apex_available:platform",
61 "com.android.os.statsd",
62 "test_com.android.os.statsd",
Yu-Ting Tseng8e5ff982024-10-04 11:22:15 -070063 "com.android.uprobestats",
Jeffrey Huang260613f2020-02-14 10:08:22 -080064 ],
Yi Jin18678bd2018-04-27 11:51:13 -070065}
66
Yi Jinad3e6e52018-04-03 15:10:34 -070067cc_test {
68 name: "libprotoutil_test",
69
Yi Jin18678bd2018-04-27 11:51:13 -070070 defaults: ["libprotoutil_defaults"],
71
72 local_include_dirs: ["include"],
73
Yi Jinc3d4b282018-04-23 16:02:20 -070074 srcs: ["tests/*"],
Yi Jinad3e6e52018-04-03 15:10:34 -070075
76 shared_libs: [
Yi Jinc3d4b282018-04-23 16:02:20 -070077 "libprotobuf-cpp-full",
Yi Jinad3e6e52018-04-03 15:10:34 -070078 ],
79
80 static_libs: [
81 "libgmock",
82 ],
Yi Jinc3d4b282018-04-23 16:02:20 -070083
Kalesh Singhf5a3b8a2023-08-10 13:38:17 -070084 test_suites: [
85 "general-tests",
86 ],
87
Yi Jinc3d4b282018-04-23 16:02:20 -070088 proto: {
89 type: "full",
Jooyung Han907d7162022-06-24 14:56:23 +090090 },
Yi Jinad3e6e52018-04-03 15:10:34 -070091}