| // build time C++ available list of all HIDL interfaces in the tree |
| package { |
| // See: http://go/android-license-faq |
| // A large-scale-change added 'default_applicable_licenses' to import |
| // all of the 'license_kinds' from "system_tools_hidl_license" |
| // to get the below license kinds: |
| // SPDX-license-identifier-Apache-2.0 |
| default_applicable_licenses: ["system_tools_hidl_license"], |
| } |
| |
| cc_library { |
| name: "libhidlmetadata", |
| host_supported: true, |
| srcs: [":hidl_metadata_in_cpp"], |
| export_include_dirs: ["include"], |
| |
| cflags: ["-O0"], |
| } |
| |
| cc_library_headers { |
| name: "libhidlmetadata_headers", |
| product_available: true, |
| recovery_available: true, |
| host_supported: true, |
| export_include_dirs: ["include"], |
| } |
| |
| cc_test_host { |
| name: "hidl_metadata_test", |
| srcs: ["test.cpp"], |
| static_libs: [ |
| "libhidlmetadata", |
| "libgmock", |
| ], |
| } |
| |
| prebuilt_hidl_interfaces { |
| name: "hidl_metadata_test_interfaces1", |
| interfaces: [ |
| "hidl.metadata.test@1.0::IBar", |
| ], |
| } |
| |
| prebuilt_hidl_interfaces { |
| name: "hidl_metadata_test_interfaces2", |
| interfaces: [ |
| "hidl.metadata.test@1.0::IBaz", |
| "hidl.metadata.test@1.0::IFoo", |
| ], |
| } |
| |
| // private impl below |
| |
| cc_binary { |
| name: "hidl_metadata_parser", |
| host_supported: true, |
| srcs: ["parser.cpp"], |
| shared_libs: ["libjsoncpp"], |
| visibility: [":__subpackages__"], |
| } |
| |
| cc_genrule { |
| name: "hidl_metadata_in_cpp", |
| host_supported: true, |
| cmd: "$(location hidl_metadata_parser) $(in) > $(genDir)/metadata.cpp", |
| srcs: [ |
| ":hidl_metadata_json", |
| ], |
| tools: ["hidl_metadata_parser"], |
| visibility: [":__subpackages__"], |
| out: ["metadata.cpp"], |
| } |