Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 1 | // 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 Badour | a7548b5 | 2022-01-27 22:04:48 -0800 | [diff] [blame] | 14 | |
Bob Badour | 390b27e | 2021-03-19 04:22:23 -0700 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
Bob Badour | a7548b5 | 2022-01-27 22:04:48 -0800 | [diff] [blame] | 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
Bob Badour | 390b27e | 2021-03-19 04:22:23 -0700 | [diff] [blame] | 18 | } |
| 19 | |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 20 | // Source code used for test |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 21 | filegroup { |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 22 | name: "launcher-tests-src", |
Thales Lima | a101290 | 2022-01-13 17:58:42 +0000 | [diff] [blame] | 23 | srcs: [ |
| 24 | "src/**/*.java", |
| 25 | "src/**/*.kt" |
| 26 | ], |
Thales Lima | 9938c2f | 2022-07-25 14:38:16 +0100 | [diff] [blame] | 27 | exclude_srcs: [ |
| 28 | ":launcher-non-quickstep-tests-src" |
| 29 | ], |
| 30 | } |
| 31 | |
| 32 | // Source code used for non-quickstep tests |
| 33 | filegroup { |
| 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 Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 39 | } |
| 40 | |
| 41 | // Source code used for oop test helpers |
| 42 | filegroup { |
| 43 | name: "launcher-oop-tests-src", |
| 44 | srcs: [ |
| 45 | "src/com/android/launcher3/ui/AbstractLauncherUiTest.java", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 46 | "src/com/android/launcher3/ui/PortraitLandscapeRunner.java", |
Sebastian Franco | 0451d23 | 2023-02-01 16:43:58 -0800 | [diff] [blame] | 47 | "src/com/android/launcher3/ui/TaplTestsLauncher3.java", |
My Name | 5b59e75 | 2021-12-15 20:54:45 -0500 | [diff] [blame] | 48 | "src/com/android/launcher3/util/TestUtil.java", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 49 | "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", |
vadimt | 25fbd5b | 2022-04-19 17:31:28 -0700 | [diff] [blame] | 53 | "src/com/android/launcher3/util/rule/SamplerRule.java", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 54 | "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 Franco | 0451d23 | 2023-02-01 16:43:58 -0800 | [diff] [blame] | 58 | "src/com/android/launcher3/util/rule/TISBindRule.java", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 59 | "src/com/android/launcher3/testcomponent/BaseTestingActivity.java", |
Pat Manning | 30c28a0 | 2022-01-31 16:01:51 +0000 | [diff] [blame] | 60 | "src/com/android/launcher3/testcomponent/OtherBaseTestingActivity.java", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 61 | "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 Lu | 4d4f62a | 2022-09-15 09:36:45 +0800 | [diff] [blame] | 64 | "src/com/android/launcher3/testcomponent/ImeTestActivity.java", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 65 | ], |
| 66 | } |
| 67 | |
| 68 | // Library with all the dependencies for building quickstep |
| 69 | android_library { |
| 70 | name: "Launcher3TestLib", |
| 71 | srcs: [ ], |
| 72 | resource_dirs: ["res"], |
| 73 | static_libs: [ |
| 74 | "launcher-aosp-tapl", |
Sunny Goyal | 177785e | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 75 | "androidx.test.core", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 76 | "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", |
vadimt | 13839e4 | 2022-02-17 13:56:06 -0800 | [diff] [blame] | 85 | "truth-prebuilt", |
| 86 | "platform-test-rules", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 87 | ], |
| 88 | manifest: "AndroidManifest-common.xml", |
| 89 | platform_apis: true, |
| 90 | } |
| 91 | |
My Name | 5b59e75 | 2021-12-15 20:54:45 -0500 | [diff] [blame] | 92 | android_library { |
| 93 | name: "Launcher3TestResources", |
| 94 | resource_dirs: ["res"], |
| 95 | } |
| 96 | |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 97 | android_test { |
| 98 | name: "Launcher3Tests", |
| 99 | srcs: [ |
| 100 | ":launcher-tests-src", |
Thales Lima | 9938c2f | 2022-07-25 14:38:16 +0100 | [diff] [blame] | 101 | ":launcher-non-quickstep-tests-src", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 102 | ], |
| 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", |
Alexander Martinz | 8a2cd16 | 2023-04-17 13:35:15 +0200 | [diff] [blame^] | 115 | instrumentation_for: "SHIFT-Home", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 116 | manifest: "AndroidManifest.xml", |
| 117 | platform_apis: true, |
| 118 | test_config: "Launcher3Tests.xml", |
Alexander Martinz | 8a2cd16 | 2023-04-17 13:35:15 +0200 | [diff] [blame^] | 119 | data: [":SHIFT-Home"], |
Vadim Tryshev | 990a32e | 2023-03-02 21:51:21 +0000 | [diff] [blame] | 120 | test_suites: ["general-tests"], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 121 | } |
Nicolo' Mazzucato | e8ee34a | 2023-01-24 15:41:10 +0000 | [diff] [blame] | 122 | |
| 123 | // Shared between tests and launcher |
| 124 | android_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, |
Alexander Martinz | 8a2cd16 | 2023-04-17 13:35:15 +0200 | [diff] [blame^] | 133 | } |