1// build time C++ available list of all AIDL interfaces in the tree 2package { 3 // See: http://go/android-license-faq 4 // A large-scale-change added 'default_applicable_licenses' to import 5 // all of the 'license_kinds' from "system_tools_aidl_license" 6 // to get the below license kinds: 7 // SPDX-license-identifier-Apache-2.0 8 default_applicable_licenses: ["system_tools_aidl_license"], 9} 10 11cc_test_library { 12 name: "libaidlmetadata", 13 host_supported: true, 14 srcs: [":aidl_metadata_in_cpp"], 15 export_include_dirs: ["include"], 16 17 cflags: ["-O0"], 18} 19 20cc_library_headers { 21 name: "libaidlmetadata_headers", 22 product_available: true, 23 recovery_available: true, 24 host_supported: true, 25 export_include_dirs: ["include"], 26} 27 28// private impl below 29 30cc_binary { 31 name: "aidl_metadata_parser", 32 host_supported: true, 33 srcs: ["parser.cpp"], 34 shared_libs: ["libjsoncpp"], 35 visibility: [":__subpackages__"], 36} 37 38cc_genrule { 39 name: "aidl_metadata_in_cpp", 40 host_supported: true, 41 cmd: "$(location aidl_metadata_parser) $(in) > $(genDir)/metadata.cpp", 42 srcs: [ 43 ":aidl_metadata_json", 44 ], 45 tools: ["aidl_metadata_parser"], 46 visibility: [":__subpackages__"], 47 out: ["metadata.cpp"], 48} 49 50cc_test_host { 51 name: "libaidlmetadata_test", 52 static_libs: [ 53 "libaidlmetadata", 54 "libgmock", 55 ], 56 srcs: ["test.cpp"], 57 test_options: { 58 unit_test: true, 59 }, 60 test_suites: ["general-tests"], 61} 62