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-kotlin-nodeps",
38        "mockito-target-extended-minus-junit4",
39        "SystemUI-tests-base",
40        "SystemUICustomizationTestUtils",
41        "TvSystemUI-core",
42    ],
43
44    libs: [
45        "android.test.runner.stubs.system",
46        "android.test.base.stubs.system",
47        "android.test.mock.stubs.system",
48    ],
49
50    jni_libs: [
51        "libdexmakerjvmtiagent",
52        "libmultiplejvmtiagentsinterferenceagent",
53        "libstaticjvmtiagent",
54    ],
55
56    aaptflags: [
57        "--extra-packages",
58        "com.android.systemui",
59    ],
60
61    plugins: ["dagger2-compiler"],
62
63    optimize: {
64        proguard_flags_files: ["proguard.flags"],
65    },
66
67    // sign this with platform cert, so this test is allowed to inject key events into
68    // UI it doesn't own. This is necessary to allow screenshots to be taken
69    certificate: "platform",
70    platform_apis: true,
71    test_suites: ["device-tests"],
72    compile_multilib: "both",
73    dxflags: ["--multi-dex"],
74    kotlincflags: ["-Xjvm-default=all"],
75
76    lint: {
77        test: true,
78        extra_check_modules: ["SystemUILintChecker"],
79    },
80}
81