2021-03-12 16:00:40 -08:00
|
|
|
// Copyright (C) 2021 The Android Open Source Project
|
|
|
|
|
//
|
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
|
//
|
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
//
|
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
|
// limitations under the License.
|
2022-01-27 22:04:48 -08:00
|
|
|
|
2021-03-19 04:22:23 -07:00
|
|
|
package {
|
|
|
|
|
// See: http://go/android-license-faq
|
2022-01-27 22:04:48 -08:00
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
2021-03-19 04:22:23 -07:00
|
|
|
}
|
|
|
|
|
|
2021-07-29 15:48:24 -07:00
|
|
|
// Source code used for test
|
2021-03-12 16:00:40 -08:00
|
|
|
filegroup {
|
2021-07-29 15:48:24 -07:00
|
|
|
name: "launcher-tests-src",
|
2022-01-13 17:58:42 +00:00
|
|
|
srcs: [
|
2024-01-11 14:03:12 -08:00
|
|
|
"src/**/*.java",
|
|
|
|
|
"src/**/*.kt",
|
2024-05-06 11:31:26 -07:00
|
|
|
"multivalentTests/src/**/*.java",
|
|
|
|
|
"multivalentTests/src/**/*.kt",
|
2022-01-13 17:58:42 +00:00
|
|
|
],
|
2022-07-25 14:38:16 +01:00
|
|
|
exclude_srcs: [
|
2024-01-11 14:03:12 -08:00
|
|
|
":launcher-non-quickstep-tests-src",
|
2022-07-25 14:38:16 +01:00
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-19 18:56:34 +00:00
|
|
|
filegroup {
|
|
|
|
|
name: "launcher3-robo-src",
|
|
|
|
|
// multivalentTests directory is a shared folder for not only robolectric converted test
|
|
|
|
|
// classes but also shared helper classes.
|
|
|
|
|
srcs: [
|
|
|
|
|
"multivalentTests/src/**/*.java",
|
|
|
|
|
"multivalentTests/src/**/*.kt",
|
2024-05-06 11:31:26 -07:00
|
|
|
"src_deviceless/**/*.java",
|
|
|
|
|
"src_deviceless/**/*.kt",
|
2024-03-19 18:56:34 +00:00
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-25 14:38:16 +01:00
|
|
|
// Source code used for non-quickstep tests
|
|
|
|
|
filegroup {
|
|
|
|
|
name: "launcher-non-quickstep-tests-src",
|
|
|
|
|
srcs: [
|
2024-01-11 14:03:12 -08:00
|
|
|
"src/com/android/launcher3/nonquickstep/**/*.java",
|
|
|
|
|
"src/com/android/launcher3/nonquickstep/**/*.kt",
|
2022-07-25 14:38:16 +01:00
|
|
|
],
|
2021-07-29 15:48:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Source code used for oop test helpers
|
|
|
|
|
filegroup {
|
|
|
|
|
name: "launcher-oop-tests-src",
|
|
|
|
|
srcs: [
|
2024-03-18 14:50:48 -07:00
|
|
|
":launcher-testing-helpers",
|
2025-04-28 18:31:10 -07:00
|
|
|
":launcher-oop-tests-only",
|
2021-07-29 15:48:24 -07:00
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Library with all the dependencies for building quickstep
|
|
|
|
|
android_library {
|
|
|
|
|
name: "Launcher3TestLib",
|
2024-01-11 14:03:12 -08:00
|
|
|
srcs: [],
|
2023-01-10 10:47:46 -06:00
|
|
|
asset_dirs: ["assets"],
|
2021-07-29 15:48:24 -07:00
|
|
|
resource_dirs: ["res"],
|
|
|
|
|
static_libs: [
|
2023-08-23 21:40:57 -07:00
|
|
|
"flag-junit-base",
|
2021-07-29 15:48:24 -07:00
|
|
|
"launcher-aosp-tapl",
|
2021-07-29 15:48:24 -07:00
|
|
|
"androidx.test.core",
|
2021-07-29 15:48:24 -07:00
|
|
|
"androidx.test.runner",
|
|
|
|
|
"androidx.test.rules",
|
|
|
|
|
"androidx.test.ext.junit",
|
|
|
|
|
"androidx.test.espresso.core",
|
|
|
|
|
"androidx.test.espresso.contrib",
|
|
|
|
|
"androidx.test.espresso.intents",
|
|
|
|
|
"androidx.test.uiautomator_uiautomator",
|
2023-10-03 16:02:39 -04:00
|
|
|
"mockito-kotlin2",
|
2023-08-24 18:28:19 -07:00
|
|
|
"mockito-target-extended-minus-junit4",
|
2021-07-29 15:48:24 -07:00
|
|
|
"launcher_log_protos_lite",
|
2023-10-10 06:50:28 +00:00
|
|
|
"truth",
|
2024-03-25 10:53:06 +00:00
|
|
|
"kotlinx_coroutines_test",
|
2022-02-17 13:56:06 -08:00
|
|
|
"platform-test-rules",
|
2023-02-17 15:06:58 +00:00
|
|
|
"testables",
|
2023-08-30 13:31:10 -07:00
|
|
|
"com_android_launcher3_flags_lib",
|
2023-10-10 14:54:39 -07:00
|
|
|
"com_android_wm_shell_flags_lib",
|
2025-05-28 19:11:15 +00:00
|
|
|
"com_android_systemui_shared_flags_lib",
|
2023-11-07 22:31:46 +00:00
|
|
|
"android.appwidget.flags-aconfig-java",
|
2024-10-17 09:44:25 -07:00
|
|
|
"platform-parametric-runner-lib",
|
|
|
|
|
"kotlin-reflect",
|
2025-05-10 10:53:58 +01:00
|
|
|
"kotlin-test",
|
2021-07-29 15:48:24 -07:00
|
|
|
],
|
|
|
|
|
manifest: "AndroidManifest-common.xml",
|
|
|
|
|
platform_apis: true,
|
2024-01-11 14:03:12 -08:00
|
|
|
// TODO(b/319712088): re-enable use_resource_processor
|
|
|
|
|
use_resource_processor: false,
|
2021-07-29 15:48:24 -07:00
|
|
|
}
|
|
|
|
|
|
2021-12-15 20:54:45 -05:00
|
|
|
android_library {
|
|
|
|
|
name: "Launcher3TestResources",
|
|
|
|
|
resource_dirs: ["res"],
|
2024-04-26 18:42:58 +00:00
|
|
|
asset_dirs: ["assets"],
|
2024-01-11 14:03:12 -08:00
|
|
|
// TODO(b/319712088): re-enable use_resource_processor
|
|
|
|
|
use_resource_processor: false,
|
2024-10-17 09:44:25 -07:00
|
|
|
static_libs: [
|
|
|
|
|
"kotlin-reflect",
|
|
|
|
|
],
|
2021-12-15 20:54:45 -05:00
|
|
|
}
|
|
|
|
|
|
2021-07-29 15:48:24 -07:00
|
|
|
android_test {
|
|
|
|
|
name: "Launcher3Tests",
|
2024-08-06 16:54:59 +01:00
|
|
|
defaults: [
|
|
|
|
|
"launcher_compose_tests_defaults",
|
|
|
|
|
],
|
2021-07-29 15:48:24 -07:00
|
|
|
srcs: [
|
|
|
|
|
":launcher-tests-src",
|
2022-07-25 14:38:16 +01:00
|
|
|
":launcher-non-quickstep-tests-src",
|
2021-07-29 15:48:24 -07:00
|
|
|
],
|
2023-08-23 21:40:57 -07:00
|
|
|
static_libs: [
|
|
|
|
|
"Launcher3TestLib",
|
2023-08-30 13:31:10 -07:00
|
|
|
"com_android_launcher3_flags_lib",
|
2025-05-28 19:11:15 +00:00
|
|
|
"com_android_systemui_shared_flags_lib",
|
2023-08-23 21:40:57 -07:00
|
|
|
],
|
2021-07-29 15:48:24 -07:00
|
|
|
libs: [
|
2024-08-30 00:29:41 +00:00
|
|
|
"android.test.base.stubs.system",
|
|
|
|
|
"android.test.runner.stubs.system",
|
|
|
|
|
"android.test.mock.stubs.system",
|
2021-07-29 15:48:24 -07:00
|
|
|
],
|
2023-08-24 18:28:19 -07:00
|
|
|
// Libraries used by mockito inline extended
|
2021-07-29 15:48:24 -07:00
|
|
|
jni_libs: [
|
|
|
|
|
"libdexmakerjvmtiagent",
|
|
|
|
|
"libstaticjvmtiagent",
|
|
|
|
|
],
|
|
|
|
|
use_embedded_native_libs: false,
|
|
|
|
|
compile_multilib: "both",
|
|
|
|
|
instrumentation_for: "Launcher3",
|
|
|
|
|
manifest: "AndroidManifest.xml",
|
|
|
|
|
platform_apis: true,
|
|
|
|
|
test_config: "Launcher3Tests.xml",
|
2023-03-02 21:51:21 +00:00
|
|
|
data: [":Launcher3"],
|
2024-10-22 11:52:31 -07:00
|
|
|
plugins: ["dagger2-compiler"],
|
2023-03-02 21:51:21 +00:00
|
|
|
test_suites: ["general-tests"],
|
2021-03-12 16:00:40 -08:00
|
|
|
}
|
2023-01-24 15:41:10 +00:00
|
|
|
|
2023-12-19 10:09:25 +00:00
|
|
|
filegroup {
|
2024-08-23 22:13:33 +00:00
|
|
|
name: "launcher-testing-helpers-robo",
|
2023-12-19 10:09:25 +00:00
|
|
|
srcs: [
|
2024-01-11 14:03:12 -08:00
|
|
|
"src/**/*.java",
|
|
|
|
|
"src/**/*.kt",
|
|
|
|
|
"multivalentTests/src/**/*.java",
|
|
|
|
|
"multivalentTests/src/**/*.kt",
|
2025-04-28 18:31:10 -07:00
|
|
|
"src/com/android/launcher3/util/ui/AbstractLauncherUiTest.java",
|
|
|
|
|
"src/com/android/launcher3/util/ui/BaseLauncherTaplTest.java",
|
2024-03-04 09:49:39 +00:00
|
|
|
"tapl/com/android/launcher3/tapl/*.java",
|
|
|
|
|
"tapl/com/android/launcher3/tapl/*.kt",
|
2023-12-19 10:09:25 +00:00
|
|
|
],
|
|
|
|
|
exclude_srcs: [
|
|
|
|
|
// Test classes
|
|
|
|
|
"src/**/*Test.java",
|
|
|
|
|
"src/**/*Test.kt",
|
2024-07-26 16:41:49 +00:00
|
|
|
"src/**/RoboApiWrapper.kt",
|
2025-02-11 17:15:31 -08:00
|
|
|
"src/**/EventsRule.kt",
|
2025-04-25 15:56:47 -07:00
|
|
|
"src/**/LauncherCustomizer.kt",
|
2023-12-27 11:44:16 +00:00
|
|
|
"multivalentTests/src/**/*Test.java",
|
|
|
|
|
"multivalentTests/src/**/*Test.kt",
|
2023-12-19 10:09:25 +00:00
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-26 16:41:49 +00:00
|
|
|
filegroup {
|
|
|
|
|
name: "launcher-testing-helpers",
|
|
|
|
|
srcs: [
|
2024-08-23 22:13:33 +00:00
|
|
|
":launcher-testing-helpers-robo",
|
2024-07-26 16:41:49 +00:00
|
|
|
"src/**/RoboApiWrapper.kt",
|
|
|
|
|
],
|
|
|
|
|
}
|
|
|
|
|
|
2023-12-19 10:09:25 +00:00
|
|
|
android_robolectric_test {
|
|
|
|
|
enabled: true,
|
|
|
|
|
name: "Launcher3RoboTests",
|
|
|
|
|
srcs: [
|
2024-03-19 18:56:34 +00:00
|
|
|
":launcher3-robo-src",
|
2024-08-23 22:13:33 +00:00
|
|
|
":launcher-testing-helpers-robo",
|
2023-12-19 10:09:25 +00:00
|
|
|
],
|
|
|
|
|
exclude_srcs: [
|
2023-12-27 11:44:16 +00:00
|
|
|
//"src/com/android/launcher3/util/CellContentDimensionsTest.kt", // Failing - b/316553889
|
2023-12-19 10:09:25 +00:00
|
|
|
|
|
|
|
|
// requires modification to work with inline mock maker
|
|
|
|
|
"src/com/android/launcher3/util/rule/StaticMockitoRule.java",
|
|
|
|
|
],
|
|
|
|
|
java_resource_dirs: ["config"],
|
|
|
|
|
static_libs: [
|
|
|
|
|
"flag-junit-base",
|
2024-05-21 15:42:34 +00:00
|
|
|
"flag-junit",
|
2023-12-19 10:09:25 +00:00
|
|
|
"com_android_launcher3_flags_lib",
|
|
|
|
|
"com_android_wm_shell_flags_lib",
|
2025-05-28 19:11:15 +00:00
|
|
|
"com_android_systemui_shared_flags_lib",
|
2023-12-19 10:09:25 +00:00
|
|
|
"androidx.test.uiautomator_uiautomator",
|
|
|
|
|
"androidx.core_core-animation-testing",
|
|
|
|
|
"androidx.test.ext.junit",
|
2024-05-23 22:03:42 +00:00
|
|
|
"androidx.test.espresso.core",
|
|
|
|
|
"androidx.test.espresso.contrib",
|
|
|
|
|
"androidx.test.espresso.intents",
|
2024-03-21 21:50:20 +00:00
|
|
|
"androidx.test.rules",
|
2024-04-08 20:59:23 +00:00
|
|
|
"uiautomator-helpers",
|
2024-05-21 11:59:05 +00:00
|
|
|
"inline-mockito-robolectric-prebuilt",
|
|
|
|
|
"mockito-kotlin-nodeps",
|
2023-12-19 10:09:25 +00:00
|
|
|
"platform-parametric-runner-lib",
|
2024-05-21 15:42:34 +00:00
|
|
|
"platform-test-rules-deviceless",
|
2023-12-19 10:09:25 +00:00
|
|
|
"testables",
|
|
|
|
|
"Launcher3TestResources",
|
|
|
|
|
"SystemUISharedLib",
|
|
|
|
|
"launcher-testing-shared",
|
2024-06-08 01:15:40 +00:00
|
|
|
"android.appwidget.flags-aconfig-java",
|
2023-12-19 10:09:25 +00:00
|
|
|
],
|
|
|
|
|
libs: [
|
2024-08-30 00:29:41 +00:00
|
|
|
"android.test.runner.stubs.system",
|
|
|
|
|
"android.test.base.stubs.system",
|
|
|
|
|
"android.test.mock.stubs.system",
|
2023-12-19 10:09:25 +00:00
|
|
|
"truth",
|
|
|
|
|
],
|
|
|
|
|
instrumentation_for: "Launcher3",
|
2024-10-22 11:52:31 -07:00
|
|
|
plugins: ["dagger2-compiler"],
|
2024-05-08 01:43:53 +00:00
|
|
|
strict_mode: false,
|
2023-12-19 10:09:25 +00:00
|
|
|
}
|