blob: d2b7d5c75d58ef79bc2d92f73c207df10204c03c [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.
Yi Jin18678bd2018-04-27 11:51:13 -070015cc_defaults {
16 name: "libprotoutil_defaults",
Yi Jin04625ad2017-10-17 18:29:33 -070017
18 cflags: [
19 "-Wall",
20 "-Werror",
21 "-Wno-missing-field-initializers",
22 "-Wno-unused-variable",
23 "-Wunused-parameter",
24 ],
25
26 srcs: [
27 "src/EncodedBuffer.cpp",
Joe Onorato99598ee2019-02-11 15:55:13 +000028 "src/ProtoFileReader.cpp",
Yi Jin04625ad2017-10-17 18:29:33 -070029 "src/ProtoOutputStream.cpp",
Joe Onorato99598ee2019-02-11 15:55:13 +000030 "src/ProtoReader.cpp",
Yi Jin04625ad2017-10-17 18:29:33 -070031 "src/protobuf.cpp",
32 ],
33
Yi Jin04625ad2017-10-17 18:29:33 -070034 shared_libs: [
Yi Jinc5b71ee2018-04-25 16:51:40 -070035 "libbase",
Joe Onorato99598ee2019-02-11 15:55:13 +000036 "libutils",
Yi Jin04625ad2017-10-17 18:29:33 -070037 "libcutils",
38 "liblog",
39 ],
40}
Yi Jinad3e6e52018-04-03 15:10:34 -070041
Yi Jin18678bd2018-04-27 11:51:13 -070042cc_library {
43 name: "libprotoutil",
44
45 defaults: ["libprotoutil_defaults"],
46
47 export_include_dirs: ["include"],
Jeffrey Huang260613f2020-02-14 10:08:22 -080048
49 apex_available: [
50 "//apex_available:platform",
51 "com.android.os.statsd",
52 "test_com.android.os.statsd",
53 ],
Yi Jin18678bd2018-04-27 11:51:13 -070054}
55
Yi Jinad3e6e52018-04-03 15:10:34 -070056cc_test {
57 name: "libprotoutil_test",
58
Yi Jin18678bd2018-04-27 11:51:13 -070059 defaults: ["libprotoutil_defaults"],
60
61 local_include_dirs: ["include"],
62
Yi Jinc3d4b282018-04-23 16:02:20 -070063 srcs: ["tests/*"],
Yi Jinad3e6e52018-04-03 15:10:34 -070064
65 shared_libs: [
Yi Jinc3d4b282018-04-23 16:02:20 -070066 "libprotobuf-cpp-full",
Yi Jinad3e6e52018-04-03 15:10:34 -070067 ],
68
69 static_libs: [
70 "libgmock",
71 ],
Yi Jinc3d4b282018-04-23 16:02:20 -070072
73 proto: {
74 type: "full",
75 }
Yi Jinad3e6e52018-04-03 15:10:34 -070076}