1// 2// Copyright (C) 2019 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// 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21android_library { 22 name: "tv-test-common", 23 24 // Include all test java files. 25 srcs: [ 26 "src/**/*.java", 27 "src/**/I*.aidl", 28 ], 29 30 static_libs: [ 31 "android-support-annotations", 32 "androidx.test.runner", 33 "androidx.test.rules", 34 "tv-guava-android-jar", 35 "mockito-robolectric-prebuilt", 36 "tv-lib-truth", 37 "androidx.test.uiautomator_uiautomator", 38 "Robolectric_all-target_upstream", 39 ], 40 41 // Link tv-common as shared library to avoid the problem of initialization of the constants 42 libs: [ 43 "tv-common", 44 "LiveTv", 45 ], 46 47 sdk_version: "system_current", 48 49 resource_dirs: ["res"], 50 aidl: { 51 local_include_dirs: ["src"], 52 }, 53 54} 55 56android_library { 57 name: "tv-test-common-robo", 58 srcs: [ 59 "src/com/android/tv/testing/robo/**/*.java", 60 "src/com/android/tv/testing/shadows/**/*.java", 61 ], 62 static_libs: [ 63 "Robolectric_all-target_upstream", 64 "mockito-robolectric-prebuilt", 65 "tv-test-common", 66 ], 67 // Disable dexpreopt and <uses-library> check for test. 68 enforce_uses_libs: false, 69 dex_preopt: { 70 enabled: false, 71 }, 72 resource_dirs: [ 73 "res", 74 ], 75 libs: [ 76 "LiveTv", 77 ], 78} 79