blob: 39bd3074a37b101fd3c04194cc1056ecab8f90e1 [file] [log] [blame]
Sunny Goyalf5c42ea2021-03-12 16:00:40 -08001// Copyright (C) 2021 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.
Bob Badoura7548b52022-01-27 22:04:48 -080014
Bob Badour390b27e2021-03-19 04:22:23 -070015package {
16 // See: http://go/android-license-faq
Bob Badoura7548b52022-01-27 22:04:48 -080017 default_applicable_licenses: ["Android-Apache-2.0"],
Bob Badour390b27e2021-03-19 04:22:23 -070018}
19
Sunny Goyal4af8cf92021-07-29 15:48:24 -070020// Source code used for test
Sunny Goyalf5c42ea2021-03-12 16:00:40 -080021filegroup {
Sunny Goyal4af8cf92021-07-29 15:48:24 -070022 name: "launcher-tests-src",
Thales Limaa1012902022-01-13 17:58:42 +000023 srcs: [
24 "src/**/*.java",
25 "src/**/*.kt"
26 ],
Thales Lima9938c2f2022-07-25 14:38:16 +010027 exclude_srcs: [
28 ":launcher-non-quickstep-tests-src"
29 ],
30}
31
32// Source code used for non-quickstep tests
33filegroup {
34 name: "launcher-non-quickstep-tests-src",
35 srcs: [
36 "src/com/android/launcher3/nonquickstep/**/*.java",
37 "src/com/android/launcher3/nonquickstep/**/*.kt",
38 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -070039}
40
41// Source code used for oop test helpers
42filegroup {
43 name: "launcher-oop-tests-src",
44 srcs: [
45 "src/com/android/launcher3/ui/AbstractLauncherUiTest.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070046 "src/com/android/launcher3/ui/PortraitLandscapeRunner.java",
My Name5b59e752021-12-15 20:54:45 -050047 "src/com/android/launcher3/util/TestUtil.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070048 "src/com/android/launcher3/util/Wait.java",
49 "src/com/android/launcher3/util/WidgetUtils.java",
50 "src/com/android/launcher3/util/rule/FailureWatcher.java",
51 "src/com/android/launcher3/util/rule/LauncherActivityRule.java",
vadimt25fbd5b2022-04-19 17:31:28 -070052 "src/com/android/launcher3/util/rule/SamplerRule.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070053 "src/com/android/launcher3/util/rule/ScreenRecordRule.java",
54 "src/com/android/launcher3/util/rule/ShellCommandRule.java",
55 "src/com/android/launcher3/util/rule/SimpleActivityRule.java",
56 "src/com/android/launcher3/util/rule/TestStabilityRule.java",
57 "src/com/android/launcher3/ui/TaplTestsLauncher3.java",
58 "src/com/android/launcher3/testcomponent/BaseTestingActivity.java",
Pat Manning30c28a02022-01-31 16:01:51 +000059 "src/com/android/launcher3/testcomponent/OtherBaseTestingActivity.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070060 "src/com/android/launcher3/testcomponent/CustomShortcutConfigActivity.java",
61 "src/com/android/launcher3/testcomponent/TestCommandReceiver.java",
62 "src/com/android/launcher3/testcomponent/TestLauncherActivity.java",
Ming-Shin Lu4d4f62a2022-09-15 09:36:45 +080063 "src/com/android/launcher3/testcomponent/ImeTestActivity.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070064 ],
65}
66
67// Library with all the dependencies for building quickstep
68android_library {
69 name: "Launcher3TestLib",
70 srcs: [ ],
71 resource_dirs: ["res"],
72 static_libs: [
73 "launcher-aosp-tapl",
Sunny Goyal177785e2021-07-29 15:48:24 -070074 "androidx.test.core",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070075 "androidx.test.runner",
76 "androidx.test.rules",
77 "androidx.test.ext.junit",
78 "androidx.test.espresso.core",
79 "androidx.test.espresso.contrib",
80 "androidx.test.espresso.intents",
81 "androidx.test.uiautomator_uiautomator",
82 "mockito-target-inline-minus-junit4",
83 "launcher_log_protos_lite",
vadimt13839e42022-02-17 13:56:06 -080084 "truth-prebuilt",
85 "platform-test-rules",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070086 ],
87 manifest: "AndroidManifest-common.xml",
88 platform_apis: true,
89}
90
My Name5b59e752021-12-15 20:54:45 -050091android_library {
92 name: "Launcher3TestResources",
93 resource_dirs: ["res"],
94}
95
Sunny Goyal4af8cf92021-07-29 15:48:24 -070096android_test {
97 name: "Launcher3Tests",
98 srcs: [
99 ":launcher-tests-src",
Thales Lima9938c2f2022-07-25 14:38:16 +0100100 ":launcher-non-quickstep-tests-src",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700101 ],
102 static_libs: ["Launcher3TestLib"],
103 libs: [
104 "android.test.base",
105 "android.test.runner",
106 "android.test.mock",
107 ],
108 jni_libs: [
109 "libdexmakerjvmtiagent",
110 "libstaticjvmtiagent",
111 ],
112 use_embedded_native_libs: false,
113 compile_multilib: "both",
114 instrumentation_for: "Launcher3",
115 manifest: "AndroidManifest.xml",
116 platform_apis: true,
117 test_config: "Launcher3Tests.xml",
118 data: [":Launcher3"]
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800119}