1package { 2 default_team: "trendy_team_fwk_nfc", 3 default_applicable_licenses: ["Android-Apache-2.0"], 4} 5 6cc_library_static { 7 name: "libnfc_nci_jni_static", 8 defaults: ["libnfc_nci_jni_defaults"], 9 visibility: [ 10 "//packages/apps/Nfc/nci/jni", 11 ], 12} 13 14cc_library_shared { 15 name: "libnfc_nci_jni", 16 defaults: ["libnfc_nci_jni_defaults"], 17} 18 19cc_defaults { 20 name: "libnfc_nci_jni_defaults", 21 22 cflags: [ 23 "-Wall", 24 "-Wextra", 25 "-Wno-unused-parameter", 26 "-Werror", 27 28 "-DNXP_UICC_ENABLE", 29 ], 30 31 srcs: ["**/*.cpp"], 32 exclude_srcs: ["**/*Test.cpp"], 33 34 include_dirs: [ 35 "system/nfc/src/nfa/include", 36 "system/nfc/src/nfc/include", 37 "system/nfc/src/include", 38 "system/nfc/src/gki/ulinux", 39 "system/nfc/src/gki/common", 40 "system/nfc/utils/include", 41 ], 42 43 shared_libs: [ 44 "libnativehelper", 45 "libcutils", 46 "libutils", 47 "liblog", 48 "libbase", 49 // Treble configuration 50 "libhidlbase", 51 "libutils", 52 "libbinder_ndk", 53 "libstatssocket", 54 "libz", 55 ], 56 57 static_libs: [ 58 "[email protected]", 59 "[email protected]", 60 "[email protected]", 61 // Add for AIDL 62 "android.hardware.nfc-V2-ndk", 63 "libnfcutils", 64 "libnfc-nci", 65 "libnfc-nci_flags", 66 "libstatslog_nfc", 67 "android_nfc_flags_aconfig_c_lib", 68 "server_configurable_flags", 69 "libxml2", 70 ], 71 72 defaults: [ 73 "aconfig_lib_cc_static_link.defaults", 74 ], 75 76 product_variables: { 77 debuggable: { 78 cflags: [ 79 "-DDCHECK_ALWAYS_ON", 80 "-DDTA_ENABLED", 81 ], 82 }, 83 }, 84 sanitize: { 85 integer_overflow: true, 86 misc_undefined: ["bounds"], 87 scs: true, 88 }, 89 stl: "libc++_static", 90 apex_available: [ 91 "//apex_available:platform", 92 "com.android.nfcservices", 93 ], 94 required: [ 95 // Provide a default libnfc-nci.conf in /system/etc for devices that 96 // does not ship one in /product 97 "libnfc-nci.conf-default", 98 ], 99 min_sdk_version: "35", // Make it 36 once available. 100} 101 102cc_test { 103 name: "libnfc-nci-jni-tests", 104 105 srcs: ["**/*Test.cpp"], 106 107 shared_libs: [ 108 "libnativehelper", 109 "libcutils", 110 "libutils", 111 "liblog", 112 "libbase", 113 // Treble configuration 114 "libhidlbase", 115 "libutils", 116 "libbinder_ndk", 117 "libstatssocket", 118 "libz", 119 ], 120 121 static_libs: [ 122 "libgmock", 123 "libgtest", 124 "libnfc-nci", 125 "libnfc_nci_jni_static", 126 "[email protected]", 127 "[email protected]", 128 "[email protected]", 129 // Add for AIDL 130 "android.hardware.nfc-V2-ndk", 131 "libnfcutils", 132 "libnfc-nci", 133 "libnfc-nci_flags", 134 "libstatslog_nfc", 135 "android_nfc_flags_aconfig_c_lib", 136 "server_configurable_flags", 137 "libxml2", 138 ], 139 140 defaults: [ 141 "aconfig_lib_cc_static_link.defaults", 142 ], 143 144 header_libs: [ 145 "jni_headers", 146 ], 147 148 include_dirs: [ 149 "packages/apps/Nfc/nci/jni", 150 "system/nfc/src/include", 151 "system/nfc/src/gki/common", 152 "system/nfc/src/gki/ulinux", 153 "system/nfc/src/nfa/include", 154 "system/nfc/src/nfc/include", 155 "system/nfc/utils/include", 156 ], 157 test_suites: [ 158 "general-tests", 159 "mts-nfc", 160 ], 161 test_config_template: "nfc_test_config_template.xml", 162 // Support multilib variants (using different suffix per sub-architecture), which is needed on 163 // build targets with secondary architectures, as the MTS test suite packaging logic flattens 164 // all test artifacts into a single `testcases` directory. 165 compile_multilib: "both", 166 multilib: { 167 lib32: { 168 suffix: "32", 169 }, 170 lib64: { 171 suffix: "64", 172 }, 173 }, 174 auto_gen_config: true, 175} 176