blob: 6c0ec4ad16e09db660930a51215e9bd88a68aa02 [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",
Sebastian Franco0451d232023-02-01 16:43:58 -080047 "src/com/android/launcher3/ui/TaplTestsLauncher3.java",
My Name5b59e752021-12-15 20:54:45 -050048 "src/com/android/launcher3/util/TestUtil.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070049 "src/com/android/launcher3/util/Wait.java",
50 "src/com/android/launcher3/util/WidgetUtils.java",
51 "src/com/android/launcher3/util/rule/FailureWatcher.java",
52 "src/com/android/launcher3/util/rule/LauncherActivityRule.java",
vadimt25fbd5b2022-04-19 17:31:28 -070053 "src/com/android/launcher3/util/rule/SamplerRule.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070054 "src/com/android/launcher3/util/rule/ScreenRecordRule.java",
55 "src/com/android/launcher3/util/rule/ShellCommandRule.java",
56 "src/com/android/launcher3/util/rule/SimpleActivityRule.java",
57 "src/com/android/launcher3/util/rule/TestStabilityRule.java",
Sebastian Franco0451d232023-02-01 16:43:58 -080058 "src/com/android/launcher3/util/rule/TISBindRule.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070059 "src/com/android/launcher3/testcomponent/BaseTestingActivity.java",
Pat Manning30c28a02022-01-31 16:01:51 +000060 "src/com/android/launcher3/testcomponent/OtherBaseTestingActivity.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070061 "src/com/android/launcher3/testcomponent/CustomShortcutConfigActivity.java",
62 "src/com/android/launcher3/testcomponent/TestCommandReceiver.java",
63 "src/com/android/launcher3/testcomponent/TestLauncherActivity.java",
Ming-Shin Lu4d4f62a2022-09-15 09:36:45 +080064 "src/com/android/launcher3/testcomponent/ImeTestActivity.java",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070065 ],
66}
67
68// Library with all the dependencies for building quickstep
69android_library {
70 name: "Launcher3TestLib",
71 srcs: [ ],
72 resource_dirs: ["res"],
73 static_libs: [
74 "launcher-aosp-tapl",
Sunny Goyal177785e2021-07-29 15:48:24 -070075 "androidx.test.core",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070076 "androidx.test.runner",
77 "androidx.test.rules",
78 "androidx.test.ext.junit",
79 "androidx.test.espresso.core",
80 "androidx.test.espresso.contrib",
81 "androidx.test.espresso.intents",
82 "androidx.test.uiautomator_uiautomator",
83 "mockito-target-inline-minus-junit4",
84 "launcher_log_protos_lite",
vadimt13839e42022-02-17 13:56:06 -080085 "truth-prebuilt",
86 "platform-test-rules",
Sunny Goyal4af8cf92021-07-29 15:48:24 -070087 ],
88 manifest: "AndroidManifest-common.xml",
89 platform_apis: true,
90}
91
My Name5b59e752021-12-15 20:54:45 -050092android_library {
93 name: "Launcher3TestResources",
94 resource_dirs: ["res"],
95}
96
Sunny Goyal4af8cf92021-07-29 15:48:24 -070097android_test {
98 name: "Launcher3Tests",
99 srcs: [
100 ":launcher-tests-src",
Thales Lima9938c2f2022-07-25 14:38:16 +0100101 ":launcher-non-quickstep-tests-src",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700102 ],
103 static_libs: ["Launcher3TestLib"],
104 libs: [
105 "android.test.base",
106 "android.test.runner",
107 "android.test.mock",
108 ],
109 jni_libs: [
110 "libdexmakerjvmtiagent",
111 "libstaticjvmtiagent",
112 ],
113 use_embedded_native_libs: false,
114 compile_multilib: "both",
Joey0fd94762018-10-02 17:09:53 +0200115 instrumentation_for: "Trebuchet",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700116 manifest: "AndroidManifest.xml",
117 platform_apis: true,
118 test_config: "Launcher3Tests.xml",
Michael Bestasce0bcfe2023-06-14 02:20:11 +0300119 data: [":Trebuchet"],
Vadim Tryshev990a32e2023-03-02 21:51:21 +0000120 test_suites: ["general-tests"],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800121}
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000122
123// Shared between tests and launcher
124android_library {
125 name: "launcher-testing-shared",
126 srcs: [
127 "shared/com/android/launcher3/testing/shared/**/*.java"
128 ],
129 resource_dirs: [ ],
130 manifest: "shared/AndroidManifest.xml",
131 sdk_version: "current",
132 min_sdk_version: min_launcher3_sdk_version,
133 }