Bob Badour | 3c53823 | 2021-02-12 21:26:48 -0800 | [diff] [blame] | 1 | package { |
| 2 | // See: http://go/android-license-faq |
| 3 | // A large-scale-change added 'default_applicable_licenses' to import |
| 4 | // all of the 'license_kinds' from "frameworks_native_license" |
| 5 | // to get the below license kinds: |
| 6 | // SPDX-license-identifier-Apache-2.0 |
| 7 | default_applicable_licenses: ["frameworks_native_license"], |
| 8 | } |
| 9 | |
Brett Chabot | c9ee330 | 2020-01-31 09:20:28 -0800 | [diff] [blame] | 10 | cc_defaults { |
| 11 | name: "fakeservicemanager_defaults", |
Brett Chabot | 2dfae8c | 2020-04-01 12:34:46 -0700 | [diff] [blame] | 12 | host_supported: true, |
Brett Chabot | c9ee330 | 2020-01-31 09:20:28 -0800 | [diff] [blame] | 13 | srcs: [ |
Devin Moore | 1621b4b | 2023-02-03 22:01:09 +0000 | [diff] [blame] | 14 | "FakeServiceManager.cpp", |
Brett Chabot | c9ee330 | 2020-01-31 09:20:28 -0800 | [diff] [blame] | 15 | ], |
| 16 | |
| 17 | shared_libs: [ |
| 18 | "libbinder", |
| 19 | "libutils", |
Pawan Wagh | 2811ae2 | 2023-08-22 00:07:03 +0000 | [diff] [blame] | 20 | "liblog", |
Brett Chabot | c9ee330 | 2020-01-31 09:20:28 -0800 | [diff] [blame] | 21 | ], |
Yifan Hong | f856a98 | 2020-10-30 14:51:17 -0700 | [diff] [blame] | 22 | target: { |
| 23 | darwin: { |
| 24 | enabled: false, |
| 25 | }, |
| 26 | }, |
Brett Chabot | c9ee330 | 2020-01-31 09:20:28 -0800 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | cc_library { |
| 30 | name: "libfakeservicemanager", |
| 31 | defaults: ["fakeservicemanager_defaults"], |
Devin Moore | 1621b4b | 2023-02-03 22:01:09 +0000 | [diff] [blame] | 32 | export_include_dirs: ["include"], |
Brett Chabot | c9ee330 | 2020-01-31 09:20:28 -0800 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | cc_test_host { |
| 36 | name: "fakeservicemanager_test", |
| 37 | defaults: ["fakeservicemanager_defaults"], |
| 38 | srcs: [ |
| 39 | "test_sm.cpp", |
| 40 | ], |
| 41 | static_libs: ["libgmock"], |
Devin Moore | 1621b4b | 2023-02-03 22:01:09 +0000 | [diff] [blame] | 42 | local_include_dirs: ["include"], |
Brett Chabot | c9ee330 | 2020-01-31 09:20:28 -0800 | [diff] [blame] | 43 | } |
Pawan Wagh | 2811ae2 | 2023-08-22 00:07:03 +0000 | [diff] [blame] | 44 | |
| 45 | rust_bindgen { |
| 46 | name: "libfakeservicemanager_bindgen", |
| 47 | crate_name: "fakeservicemanager_bindgen", |
| 48 | host_supported: true, |
| 49 | wrapper_src: "rust/wrappers/FakeServiceManagerWrapper.hpp", |
| 50 | source_stem: "bindings", |
| 51 | visibility: [":__subpackages__"], |
| 52 | bindgen_flags: [ |
| 53 | "--allowlist-function", |
| 54 | "setupFakeServiceManager", |
| 55 | "--allowlist-function", |
| 56 | "clearFakeServiceManager", |
| 57 | ], |
| 58 | shared_libs: [ |
| 59 | "libc++", |
| 60 | "libbinder", |
| 61 | "libfakeservicemanager", |
| 62 | ], |
| 63 | } |
| 64 | |
| 65 | rust_library { |
| 66 | name: "libfakeservicemanager_rs", |
| 67 | crate_name: "fakeservicemanager_rs", |
| 68 | host_supported: true, |
| 69 | srcs: [ |
| 70 | "rust/src/lib.rs", |
| 71 | ], |
| 72 | shared_libs: [ |
| 73 | "libc++", |
| 74 | "libfakeservicemanager", |
| 75 | ], |
| 76 | rustlibs: [ |
| 77 | "libfakeservicemanager_bindgen", |
| 78 | ], |
| 79 | lints: "none", |
| 80 | clippy_lints: "none", |
| 81 | } |