1// Copyright (C) 2021 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15// ============================================================ 16package { 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20android_test { 21 name: "ServiceBluetoothTests", 22 23 srcs: [ 24 "src/**/*.java", 25 ], 26 27 dxflags: ["--multi-dex"], 28 29 java_version: "1.9", 30 31 static_libs: [ 32 "androidx.test.rules", 33 "frameworks-base-testutils", 34 "mockito-target-extended-minus-junit4", 35 "platform-test-annotations", 36 "truth-prebuilt", 37 38 // Statically link service-bluetooth-pre-jarjar since we want to test the working copy of 39 // service-bluetooth, not the on-device copy. 40 // Use pre-jarjar version so that we can reference symbols before they are renamed. 41 // Then, the jarjar_rules here will perform the rename for the entire APK 42 // i.e. service-bluetooth + test code 43 "service-bluetooth-pre-jarjar", 44 ], 45 46 jarjar_rules: ":bluetooth-jarjar-rules", 47 48 libs: [ 49 "android.test.base", 50 "android.test.mock", 51 "android.test.runner", 52 "framework-bluetooth-pre-jarjar", 53 ], 54 55 jni_libs: [ 56 // these are needed for Extended Mockito 57 "libbluetooth_jni", 58 "libdexmakerjvmtiagent", 59 "libstaticjvmtiagent", 60 ], 61 compile_multilib: "both", 62 certificate: ":com.android.bluetooth.certificate", 63 64 min_sdk_version: "Tiramisu", 65 66 test_suites: [ 67 "general-tests", 68 "mts-bluetooth", 69 ], 70} 71