1package { 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 "system_bt_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-Apache-2.0 7 default_applicable_licenses: ["system_bt_license"], 8} 9 10rust_library { 11 name: "libbt_common", 12 defaults: ["gd_rust_defaults"], 13 crate_name: "bt_common", 14 srcs: ["src/lib.rs"], 15 edition: "2018", 16 rustlibs: [ 17 "libtokio", 18 "libnix", 19 "liblazy_static", 20 "liblog_rust", 21 "libcxx", 22 "libgrpcio", 23 ], 24 target: { 25 android: { 26 rustlibs: [ 27 "libandroid_logger", 28 "librustutils", 29 ], 30 shared_libs: [ 31 "libcutils", 32 ], 33 }, 34 host: { 35 rustlibs: [ 36 "libenv_logger", 37 ], 38 }, 39 }, 40 proc_macros: [ 41 "libpaste", 42 ], 43 apex_available: [ 44 "com.android.bluetooth", 45 ], 46 min_sdk_version: "30", 47} 48 49rust_test_host { 50 name: "libbt_common_inline_tests", 51 srcs: ["src/lib.rs"], 52 test_suites: ["general-tests"], 53 auto_gen_config: true, 54 rustlibs: [ 55 "libtokio", 56 "libnix", 57 "liblazy_static", 58 "liblog_rust", 59 "libenv_logger", 60 "libcxx", 61 "libgrpcio", 62 ], 63 proc_macros: [ 64 "libpaste", 65 ], 66} 67