1// Copyright (C) 2018 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. 14java_defaults { 15 name: "FrameworkMockingServicesTests-jni-defaults", 16 jni_libs: [ 17 "libmockingservicestestjni", 18 ], 19} 20 21package { 22 // See: http://go/android-license-faq 23 // A large-scale-change added 'default_applicable_licenses' to import 24 // all of the 'license_kinds' from "frameworks_base_license" 25 // to get the below license kinds: 26 // SPDX-license-identifier-Apache-2.0 27 default_applicable_licenses: ["frameworks_base_license"], 28} 29 30android_test { 31 name: "FrameworksMockingServicesTests", 32 defaults: [ 33 "FrameworkMockingServicesTests-jni-defaults", 34 "modules-utils-testable-device-config-defaults", 35 ], 36 37 srcs: [ 38 "src/**/*.java", 39 "src/**/*.kt", 40 ":framework-internal-display-sources", 41 ], 42 43 static_libs: [ 44 "androidx.test.core", 45 "androidx.test.runner", 46 "androidx.test.espresso.core", 47 "androidx.test.espresso.contrib", 48 "androidx.test.ext.truth", 49 "frameworks-base-testutils", 50 "hamcrest-library", 51 "kotlin-test", 52 "mockingservicestests-utils-mockito", 53 "mockito-target-extended-minus-junit4", 54 "platform-test-annotations", 55 "service-blobstore", 56 "service-jobscheduler", 57 "service-permission.impl", 58 "service-sdksandbox.impl", 59 "services.companion", 60 "services.core", 61 "services.devicepolicy", 62 "services.net", 63 "services.usage", 64 "services.wallpapereffectsgeneration", 65 "servicestests-core-utils", 66 "servicestests-utils-mockito-extended", 67 "testables", 68 "truth-prebuilt", 69 // TODO: remove once Android migrates to JUnit 4.12, which provides assertThrows 70 "testng", 71 "compatibility-device-util-axt", 72 ], 73 74 libs: [ 75 "android.test.mock", 76 "android.test.base", 77 "android.test.runner", 78 "servicestests-core-utils", 79 ], 80 81 jni_libs: [ 82 "libpsi", 83 ], 84 85 certificate: "platform", 86 platform_apis: true, 87 test_suites: ["device-tests"], 88 89 optimize: { 90 enabled: false, 91 }, 92} 93 94java_library { 95 name: "mockingservicestests-utils-mockito", 96 srcs: [ 97 "utils-mockito/**/*.kt", 98 ], 99 static_libs: [ 100 "junit", 101 "mockito-target-extended-minus-junit4", 102 ], 103 libs: [ 104 "android.test.runner", 105 ], 106} 107