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// Make test APK 16// ============================================================ 17package { 18 default_team: "trendy_team_fwk_uwb", 19 default_applicable_licenses: ["Android-Apache-2.0"], 20} 21 22android_test { 23 name: "ServiceUwbTests", 24 25 srcs: [ 26 ":framework-uwb-test-util-srcs", 27 "**/*.java", 28 ], 29 30 dxflags: ["--multi-dex"], 31 32 java_version: "1.9", 33 34 static_libs: [ 35 "androidx.test.rules", 36 "collector-device-lib", 37 "hamcrest-library", 38 "mockito-target-extended-minus-junit4", 39 "platform-test-annotations", 40 "frameworks-base-testutils", 41 "truth", 42 43 // Statically link service-uwb-pre-jarjar since we want to test the working copy of 44 // service-uwb, not the on-device copy. 45 // Use pre-jarjar version so that we can reference symbols before they are renamed. 46 // Then, the jarjar_rules here will perform the rename for the entire APK 47 // i.e. service-uwb + test code 48 "service-uwb-pre-jarjar", 49 "flag-junit", 50 "platform-test-annotations", 51 ], 52 53 jarjar_rules: ":uwb-jarjar-rules", 54 55 libs: [ 56 "android.test.runner", 57 "android.test.base", 58 "android.test.mock", 59 "framework-annotations-lib", 60 "framework-uwb-pre-jarjar", 61 "ServiceUwbResources", 62 "framework-statsd.stubs.module_lib", 63 "framework-wifi.stubs.module_lib", 64 ], 65 66 jni_libs: [ 67 // these are needed for Extended Mockito 68 "libdexmakerjvmtiagent", 69 "libstaticjvmtiagent", 70 ], 71 compile_multilib: "both", 72 73 min_sdk_version: "Tiramisu", 74 75 test_suites: [ 76 "general-tests", 77 "mts-uwb", 78 ], 79} 80