1// Copyright 2016, 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 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "packages_apps_CellBroadcastReceiver_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: [ 22 "packages_apps_CellBroadcastReceiver_license", 23 ], 24} 25 26java_defaults { 27 name: "CellBroadcastTestCommon", 28 libs: [ 29 "android.test.runner", 30 "telephony-common", 31 "android.test.base", 32 "android.test.mock", 33 ], 34 static_libs: [ 35 "androidx.test.rules", 36 "androidx.test.espresso.core", 37 "mockito-target-minus-junit4", 38 "truth-prebuilt", 39 "ub-uiautomator", 40 ], 41 // Include all test java files. 42 srcs: [":cellbroadcastreceiver-shared-srcs-test"], 43 platform_apis: true, 44} 45 46// in order to have our tests run on OEM devices, the test apk here includes 47// module code within it and filters out tests which require UI. 48// For the full test apk which does not run on OEM devices, see CellBroadcastReceiverUnitTests 49android_test { 50 name: "CellBroadcastReceiverOemUnitTests", 51 defaults: ["CellBroadcastTestCommon"], 52 srcs: [":cellbroadcastreceiver-sources"], 53 test_suites: ["device-tests", "mts"], 54 manifest: "AndroidManifest_OemTesting.xml", 55 test_config: "AndroidTest_Oem.xml", 56 resource_dirs: [ 57 "main-res", 58 ], 59 aaptflags: [ 60 "--custom-package com.android.cellbroadcastreceiver" 61 ], 62 static_libs: [ 63 "androidx.legacy_legacy-support-v4", 64 "androidx.legacy_legacy-support-v13", 65 "androidx.recyclerview_recyclerview", 66 "androidx.preference_preference", 67 "androidx.appcompat_appcompat", 68 "androidx.legacy_legacy-preference-v14", 69 "SettingsLibSettingsTheme", 70 "SettingsLibCollapsingToolbarBaseActivity", 71 "SettingsLibMainSwitchPreference", 72 "modules-utils-build_system", 73 ], 74 min_sdk_version: "30", 75} 76 77 78// used to run mts coverage test 79android_test { 80 name: "CellBroadcastReceiverUnitTests", 81 certificate: "networkstack", 82 defaults: ["CellBroadcastTestCommon"], 83 instrumentation_for: "CellBroadcastApp", 84 test_suites: ["device-tests", "mts"], 85 manifest: "AndroidManifest.xml", 86 test_config: "AndroidTest.xml", 87} 88 89android_test { 90 name: "CellBroadcastReceiverPlatformUnitTests", 91 certificate: "platform", 92 defaults: ["CellBroadcastTestCommon"], 93 instrumentation_for: "CellBroadcastAppPlatform", 94 test_suites: ["device-tests"], 95} 96 97// used to share src with unit test app 98filegroup { 99 name: "cellbroadcastreceiver-shared-srcs-test", 100 srcs: [ 101 "src/**/*.java", 102 ], 103} 104