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    ],
57    auto_gen_config: true,
58}
59
60android_test {
61    name: "WMShellMultivalentTestsOnDevice",
62    srcs: [
63        "src/**/*.kt",
64    ],
65    static_libs: [
66        "WindowManager-Shell",
67        "junit",
68        "androidx.core_core-animation-testing",
69        "androidx.test.runner",
70        "androidx.test.rules",
71        "androidx.test.ext.junit",
72        "frameworks-base-testutils",
73        "mockito-kotlin2",
74        "mockito-target-extended-minus-junit4",
75        "truth",
76        "platform-test-annotations",
77        "platform-test-rules",
78    ],
79    libs: [
80        "android.test.base",
81        "android.test.runner",
82    ],
83    jni_libs: [
84        "libdexmakerjvmtiagent",
85        "libstaticjvmtiagent",
86    ],
87    kotlincflags: ["-Xjvm-default=all"],
88    optimize: {
89        enabled: false,
90    },
91    test_suites: ["device-tests"],
92    platform_apis: true,
93    certificate: "platform",
94    aaptflags: [
95        "--extra-packages",
96        "com.android.wm.shell",
97    ],
98    manifest: "AndroidManifest.xml",
99}
100