1// Copyright (C) 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// A convenient library to convert any JSON string to a specific Protobuf
16// message using reflection.
17
18package {
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22cc_library_static {
23    name: "libjsonpbparse",
24    host_supported: true,
25
26    // DO NOT make it vendor_available / recovery_available; it doesn't know
27    // how to ignore unknown fields yet. Use it only for testing purposes.
28    // TODO(b/123664216): Make it understand unknown fields when libprotobuf is
29    // updated to version 3.1+, and let libprocessgroup to use this instead of
30    // libjsoncpp.
31    vendor_available: false,
32    recovery_available: false,
33
34    export_include_dirs: ["include"],
35    cflags: [
36        "-Wall",
37        "-Werror",
38        "-Wno-unused-parameter",
39    ],
40    srcs: [
41        "jsonpb.cpp",
42    ],
43    shared_libs: [
44        "libbase",
45        "libprotobuf-cpp-full",
46    ],
47}
48