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. 18package { 19 default_team: "trendy_team_android_kernel", 20 default_applicable_licenses: ["Android-Apache-2.0"], 21} 22 23cc_library_static { 24 name: "libjsonpbverify", 25 host_supported: true, 26 srcs: [ 27 "verify.cpp", 28 ], 29 shared_libs: [ 30 "libbase", 31 "libprotobuf-cpp-full", 32 "libjsoncpp", 33 ], 34 static_libs: [ 35 "libjsonpbparse", 36 ], 37 export_static_lib_headers: [ 38 "libjsonpbparse", 39 ], 40 export_include_dirs: [ 41 "include", 42 ], 43 cflags: [ 44 "-Wall", 45 "-Werror", 46 "-Wno-unused-parameter", 47 ], 48} 49 50cc_test_host { 51 name: "libjsonpbverify_test", 52 srcs: [ 53 "test.cpp", 54 "test.proto", 55 ], 56 static_libs: [ 57 "libbase", 58 "liblog", 59 "libgmock", 60 "libjsoncpp", 61 "libjsonpbparse", 62 "libjsonpbverify", 63 ], 64 shared_libs: [ 65 "libprotobuf-cpp-full", 66 ], 67 cflags: [ 68 "-Wall", 69 "-Werror", 70 "-Wno-unused-parameter", 71 ], 72} 73