xref: /aosp_15_r20/frameworks/base/libs/WindowManager/Shell/multivalentTestsForDeviceless/Android.bp (revision d57664e9bc4670b3ecf6748a746a57c557b6bc9e)
1// Copyright (C) 2019 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    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "frameworks_base_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["frameworks_base_license"],
22    default_team: "trendy_team_multitasking_windowing",
23}
24
25android_app {
26    name: "WindowManagerShellRobolectric",
27    platform_apis: true,
28    static_libs: [
29        "WindowManager-Shell",
30    ],
31    manifest: "AndroidManifestRobolectric.xml",
32    use_resource_processor: true,
33}
34
35android_robolectric_test {
36    name: "WMShellRobolectricTests",
37    instrumentation_for: "WindowManagerShellRobolectric",
38    upstream: true,
39    java_resource_dirs: [
40        "robolectric/config",
41    ],
42    srcs: [
43        "src/**/*.kt",
44    ],
45    // TODO(b/323188766): Include BubbleStackViewTest once the robolectric issue is fixed.
46    exclude_srcs: ["src/com/android/wm/shell/bubbles/BubbleStackViewTest.kt"],
47    static_libs: [
48        "junit",
49        "androidx.core_core-animation-testing",
50        "androidx.test.runner",
51        "androidx.test.rules",
52        "androidx.test.ext.junit",
53        "mockito-robolectric-prebuilt",
54        "mockito-kotlin2",
55        "truth",
56        "flag-junit-base",
57        "flag-junit",
58    ],
59    auto_gen_config: true,
60}
61
62android_test {
63    name: "WMShellMultivalentTestsOnDevice",
64    srcs: [
65        "src/**/*.kt",
66    ],
67    static_libs: [
68        "WindowManager-Shell",
69        "junit",
70        "androidx.core_core-animation-testing",
71        "androidx.test.runner",
72        "androidx.test.rules",
73        "androidx.test.ext.junit",
74        "frameworks-base-testutils",
75        "mockito-kotlin2",
76        "mockito-target-extended-minus-junit4",
77        "truth",
78        "platform-test-annotations",
79        "platform-test-rules",
80    ],
81    libs: [
82        "android.test.base.stubs.system",
83        "android.test.runner.stubs.system",
84    ],
85    jni_libs: [
86        "libdexmakerjvmtiagent",
87        "libstaticjvmtiagent",
88    ],
89    kotlincflags: ["-Xjvm-default=all"],
90    optimize: {
91        enabled: false,
92    },
93    test_suites: ["device-tests"],
94    platform_apis: true,
95    certificate: "platform",
96    aaptflags: [
97        "--extra-packages",
98        "com.android.wm.shell",
99    ],
100    manifest: "AndroidManifest.xml",
101}
102