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-mockito-expectations",
34        "adservices-test-utility",
35        "androidx.fragment_fragment",
36        "androidx.test.espresso.contrib",
37        "androidx.test.ext.junit",
38        "androidx.test.rules",
39        "compatibility-device-util-axt",
40        "mockito-target-extended-minus-junit4",
41        "truth",
42        "androidx.room_room-runtime",
43    ],
44    libs: [
45        "android.test.base",
46        "android.test.mock.stubs",
47        "framework-adservices.impl",
48        "framework-annotations-lib",
49    ],
50    test_suites: [
51        "general-tests",
52        "mts-adservices",
53    ],
54    instrumentation_for: "AdServicesApk",
55}
56
57android_test {
58    name: "AdExtServicesApkUnitTests",
59    srcs: [
60        "src/**/*.java",
61        ":adservicesapk-filegroup",
62    ],
63    certificate: "platform",
64    privileged: true,
65    defaults: ["adservices-extended-mockito-defaults"],
66    sdk_version: "module_current",
67    min_sdk_version: "30",
68    max_sdk_version: "32",
69    static_libs: [
70        "adservices-assets",
71        "adservices-service-core",
72        "adservices-test-mockito-expectations",
73        "adservices-test-utility",
74        "androidx.fragment_fragment",
75        "androidx.room_room-runtime",
76        "androidx.test.espresso.contrib",
77        "androidx.test.ext.junit",
78        "androidx.test.rules",
79        "compatibility-device-util-axt",
80        "mockito-target-extended-minus-junit4",
81        "truth",
82    ],
83    libs: [
84        "android.ext.adservices",
85        "android.test.base",
86        "android.test.mock.stubs",
87        "framework-annotations-lib",
88    ],
89    test_suites: [
90        "general-tests",
91        "mts-extservices",
92    ],
93    instrumentation_for: "ExtServices-sminus",
94    test_config: "AndroidTest.ExtServices.xml",
95}
96