Yifan Hong | 4d68f66 | 2019-02-13 14:29:33 -0800 | [diff] [blame] | 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 | // This static library defines parameterized tests that enforce additional restrictions when |
| 16 | // using Protobuf as schema for JSON files. The reason is that the JSON parser that |
| 17 | // libprotobuf-cpp-full provides is relatively relaxed. |
Bob Badour | 4e06008 | 2021-02-16 18:59:28 -0800 | [diff] [blame] | 18 | package { |
| 19 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 20 | } |
| 21 | |
Yifan Hong | 4d68f66 | 2019-02-13 14:29:33 -0800 | [diff] [blame] | 22 | cc_library_static { |
| 23 | name: "libjsonpbverify", |
| 24 | host_supported: true, |
| 25 | srcs: [ |
| 26 | "verify.cpp", |
| 27 | ], |
| 28 | shared_libs: [ |
| 29 | "libbase", |
| 30 | "libprotobuf-cpp-full", |
| 31 | "libjsoncpp", |
| 32 | ], |
| 33 | static_libs: [ |
| 34 | "libjsonpbparse", |
| 35 | ], |
| 36 | export_static_lib_headers: [ |
| 37 | "libjsonpbparse", |
| 38 | ], |
| 39 | export_include_dirs: [ |
| 40 | "include", |
| 41 | ], |
| 42 | cflags: [ |
| 43 | "-Wall", |
| 44 | "-Werror", |
| 45 | "-Wno-unused-parameter", |
| 46 | ], |
| 47 | } |
| 48 | |
| 49 | cc_test_host { |
| 50 | name: "libjsonpbverify_test", |
| 51 | srcs: [ |
| 52 | "test.cpp", |
| 53 | "test.proto", |
| 54 | ], |
| 55 | static_libs: [ |
| 56 | "libbase", |
| 57 | "liblog", |
| 58 | "libgmock", |
| 59 | "libjsoncpp", |
| 60 | "libjsonpbparse", |
| 61 | "libjsonpbverify", |
| 62 | ], |
| 63 | shared_libs: [ |
| 64 | "libprotobuf-cpp-full", |
| 65 | ], |
| 66 | cflags: [ |
| 67 | "-Wall", |
| 68 | "-Werror", |
| 69 | "-Wno-unused-parameter", |
| 70 | ], |
Yifan Hong | 4d68f66 | 2019-02-13 14:29:33 -0800 | [diff] [blame] | 71 | } |