1// 2// Copyright (C) 2023 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15 16package { 17 default_team: "trendy_team_android_settings_app", 18} 19 20android_app { 21 name: "ScreenshotTestStub", 22 defaults: [ 23 "SettingsLibDefaults", 24 ], 25 platform_apis: true, 26 certificate: "platform", 27 privileged: true, 28 use_resource_processor: true, 29 30 static_libs: [ 31 "Settings-core", 32 "androidx.fragment_fragment-testing", 33 "androidx.fragment_fragment", 34 "androidx.test.runner", 35 "androidx.test.core", 36 "androidx.test.rules", 37 "androidx.test.ext.junit", 38 "platform-screenshot-diff-core", 39 "Settings-testutils2", 40 "androidx.test.espresso.core", 41 "kotlinx-coroutines-android", 42 "androidx.lifecycle_lifecycle-runtime-testing", 43 "kotlinx_coroutines_test", 44 ], 45 uses_libs: ["org.apache.http.legacy"], 46 aaptflags: ["--extra-packages com.android.settings"], 47 manifest: "AndroidManifest.xml", 48} 49 50// This is a RNG (Robolectric native graphics) test target. 51android_robolectric_test { 52 name: "SettingsScreenshotRNGTests", 53 srcs: [ 54 "src/**/*.kt", 55 ], 56 test_suites: ["general-tests"], 57 58 // Do not add any libraries here, instead add them to the ScreenshotTestStub 59 static_libs: [ 60 "androidx.compose.runtime_runtime", 61 "androidx.test.uiautomator_uiautomator", 62 "androidx.test.ext.junit", 63 "inline-mockito-robolectric-prebuilt", 64 "platform-parametric-runner-lib", 65 "uiautomator-helpers", 66 67 ], 68 libs: [ 69 "android.test.runner", 70 "android.test.base", 71 "android.test.mock", 72 "truth", 73 ], 74 75 upstream: true, 76 instrumentation_for: "ScreenshotTestStub", 77 java_resource_dirs: ["config"], 78} 79