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. 14 15package { 16 // See: http://go/android-license-faq 17 default_applicable_licenses: ["Android-Apache-2.0"], 18} 19 20// Source code used for test 21filegroup { 22 name: "launcher-tests-src", 23 srcs: [ 24 "src/**/*.java", 25 "src/**/*.kt" 26 ], 27 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 ], 39} 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", 46 "src/com/android/launcher3/ui/PortraitLandscapeRunner.java", 47 "src/com/android/launcher3/ui/TaplTestsLauncher3.java", 48 "src/com/android/launcher3/util/TestUtil.java", 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", 53 "src/com/android/launcher3/util/rule/SamplerRule.java", 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", 58 "src/com/android/launcher3/util/rule/TISBindRule.java", 59 "src/com/android/launcher3/testcomponent/BaseTestingActivity.java", 60 "src/com/android/launcher3/testcomponent/OtherBaseTestingActivity.java", 61 "src/com/android/launcher3/testcomponent/CustomShortcutConfigActivity.java", 62 "src/com/android/launcher3/testcomponent/TestCommandReceiver.java", 63 "src/com/android/launcher3/testcomponent/TestLauncherActivity.java", 64 "src/com/android/launcher3/testcomponent/ImeTestActivity.java", 65 ], 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", 75 "androidx.test.core", 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", 85 "truth-prebuilt", 86 "platform-test-rules", 87 ], 88 manifest: "AndroidManifest-common.xml", 89 platform_apis: true, 90} 91 92android_library { 93 name: "Launcher3TestResources", 94 resource_dirs: ["res"], 95} 96 97android_test { 98 name: "Launcher3Tests", 99 srcs: [ 100 ":launcher-tests-src", 101 ":launcher-non-quickstep-tests-src", 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", 115 instrumentation_for: "Launcher3", 116 manifest: "AndroidManifest.xml", 117 platform_apis: true, 118 test_config: "Launcher3Tests.xml", 119 data: [":Launcher3"], 120 test_suites: ["general-tests"], 121} 122 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 }