1// Copyright (C) 2022 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.
14package {
15    default_team: "trendy_team_android_rubidium",
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19android_test {
20    name: "AdServicesApkUnitTests",
21    srcs: [
22        "src/**/*.java",
23        ":adservicesapk-filegroup",
24    ],
25    certificate: "platform",
26    privileged: true,
27    defaults: ["adservices-extended-mockito-defaults"],
28    sdk_version: "module_current",
29    min_sdk_version: "Tiramisu",
30    static_libs: [
31        "adservices-service-core",
32        "adservices-assets",
33        "adservices-test-utility",
34        "androidx.fragment_fragment",
35        "androidx.test.espresso.contrib",
36        "androidx.test.ext.junit",
37        "androidx.test.rules",
38        "compatibility-device-util-axt",
39        "mockito-target-extended-minus-junit4",
40        "truth",
41        "androidx.room_room-runtime",
42    ],
43    libs: [
44        "android.test.base.stubs.system",
45        "android.test.mock.stubs",
46        "framework-adservices.impl",
47        "framework-annotations-lib",
48    ],
49    test_suites: [
50        "general-tests",
51        "mts-adservices",
52    ],
53    instrumentation_for: "AdServicesApk",
54}
55
56android_test {
57    name: "AdExtServicesApkUnitTests",
58    srcs: [
59        "src/**/*.java",
60        ":adservicesapk-filegroup",
61    ],
62    certificate: "platform",
63    privileged: true,
64    defaults: ["adservices-extended-mockito-defaults"],
65    sdk_version: "module_current",
66    min_sdk_version: "31",
67    max_sdk_version: "32",
68    static_libs: [
69        "adservices-assets",
70        "adservices-service-core",
71        "adservices-test-utility",
72        "androidx.fragment_fragment",
73        "androidx.room_room-runtime",
74        "androidx.test.espresso.contrib",
75        "androidx.test.ext.junit",
76        "androidx.test.rules",
77        "compatibility-device-util-axt",
78        "mockito-target-extended-minus-junit4",
79        "truth",
80    ],
81    libs: [
82        "android.ext.adservices",
83        "android.test.base.stubs.system",
84        "android.test.mock.stubs",
85        "framework-annotations-lib",
86    ],
87    test_suites: [
88        "general-tests",
89        "mts-extservices",
90    ],
91    instrumentation_for: "ExtServices-sminus",
92    test_config: "AndroidTest.ExtServices.xml",
93}
94