• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2023 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
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19filegroup {
20    name: "adservices-test-utility-sources",
21    srcs: [
22        "java/**/*.java",
23    ],
24    exclude_srcs: [
25        "java/com/android/adservices/mockito/*.java",
26    ],
27    path: "java",
28    visibility: [
29        "//packages/modules/AdServices/adservices/tests:__subpackages__",
30    ],
31}
32
33filegroup {
34    name: "adservices-mockito-sources",
35    srcs: [
36        "java/com/android/adservices/mockito/*.java",
37    ],
38    path: "java",
39    visibility: [
40        "//packages/modules/AdServices/adservices/tests:__subpackages__",
41    ],
42}
43
44android_library {
45    name: "adservices-test-utility",
46    sdk_version: "module_current",
47    min_sdk_version: "30",
48    srcs: [
49        ":adservices-test-utility-sources",
50    ],
51    libs: [
52        "error_prone_annotations",
53        "framework-adservices-lib",
54        "framework-annotations-lib",
55    ],
56    static_libs: [
57        "androidx.test.runner",
58        "compatibility-device-util-axt",
59    ],
60    apex_available: ["com.android.adservices", "com.android.extservices"],
61}
62
63java_defaults {
64    name: "adservices-extended-mockito-defaults",
65    srcs: [
66        ":adservices-mockito-sources",
67    ],
68    defaults: [
69        "modules-utils-testable-device-config-defaults",
70    ],
71    libs: [
72        "services.core.unboosted", // For LocalManagerRegistry on ExtendedMockitoExpectations
73    ],
74    visibility: [
75        "//packages/modules/AdServices/adservices/tests:__subpackages__",
76    ],
77}
78