1//
2// Copyright (C) 2023 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20android_test {
21    name: "TvSystemUITests",
22
23    srcs: [
24        "src/**/*.kt",
25        "src/**/*.java",
26        ":SystemUI-tests-utils",
27    ],
28
29    manifest: "AndroidManifest.xml",
30
31    static_libs: [
32        "androidx.test.uiautomator_uiautomator",
33        "androidx.test.core",
34        "androidx.test.ext.junit",
35        "androidx.test.ext.truth",
36        "androidx.test.rules",
37        "mockito-target-extended-minus-junit4",
38        "SystemUI-tests-base",
39        "SystemUICustomizationTestUtils",
40        "TvSystemUI-core",
41    ],
42
43    libs: [
44        "android.test.runner",
45        "android.test.base",
46        "android.test.mock",
47    ],
48
49    jni_libs: [
50        "libdexmakerjvmtiagent",
51        "libmultiplejvmtiagentsinterferenceagent",
52        "libstaticjvmtiagent",
53    ],
54
55    aaptflags: [
56        "--extra-packages",
57        "com.android.systemui",
58    ],
59
60    plugins: ["dagger2-compiler"],
61
62    optimize: {
63        proguard_flags_files: ["proguard.flags"],
64    },
65
66    // sign this with platform cert, so this test is allowed to inject key events into
67    // UI it doesn't own. This is necessary to allow screenshots to be taken
68    certificate: "platform",
69    platform_apis: true,
70    test_suites: ["device-tests"],
71    compile_multilib: "both",
72    dxflags: ["--multi-dex"],
73    kotlincflags: ["-Xjvm-default=all"],
74
75    lint: {
76        test: true,
77        extra_check_modules: ["SystemUILintChecker"],
78    },
79}
80