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        "com.uwb.fusion",
50        "flag-junit",
51        "platform-test-annotations",
52    ],
53
54    jarjar_rules: ":uwb-jarjar-rules",
55
56    libs: [
57        "android.test.runner.stubs.system",
58        "android.test.base.stubs.system",
59        "android.test.mock.stubs.system",
60        "framework-annotations-lib",
61        "framework-uwb-pre-jarjar",
62        "ServiceUwbResources",
63        "framework-statsd.stubs.module_lib",
64        "framework-wifi.stubs.module_lib",
65    ],
66
67    jni_libs: [
68        // these are needed for Extended Mockito
69        "libdexmakerjvmtiagent",
70        "libstaticjvmtiagent",
71    ],
72    compile_multilib: "both",
73
74    min_sdk_version: "Tiramisu",
75
76    test_suites: [
77        "general-tests",
78        "mts-uwb",
79    ],
80}
81