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 "libactivitymanagermockingservicestestjni", 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: ["FrameworkMockingServicesTests-jni-defaults"], 33 34 srcs: [ 35 "src/**/*.java", 36 "src/**/*.kt", 37 ], 38 39 static_libs: [ 40 "services.core", 41 "services.devicepolicy", 42 "services.net", 43 "services.usage", 44 "service-jobscheduler", 45 "service-permission.impl", 46 "service-blobstore", 47 "service-appsearch", 48 "androidx.test.core", 49 "androidx.test.runner", 50 "androidx.test.ext.truth", 51 "mockito-target-extended-minus-junit4", 52 "platform-test-annotations", 53 "truth-prebuilt", 54 "hamcrest-library", 55 "servicestests-utils-mockito-extended", 56 "mockingservicestests-utils-mockito", 57 "servicestests-core-utils", 58 "testables", 59 // TODO: remove once Android migrates to JUnit 4.12, which provides assertThrows 60 "testng", 61 ], 62 63 libs: [ 64 "android.test.mock", 65 "android.test.base", 66 "android.test.runner", 67 ], 68 69 jni_libs: [ 70 "libdexmakerjvmtiagent", 71 "libpsi", 72 "libstaticjvmtiagent", 73 ], 74 75 certificate: "platform", 76 platform_apis: true, 77 test_suites: ["device-tests"], 78 79 optimize: { 80 enabled: false, 81 }, 82} 83 84java_library { 85 name: "mockingservicestests-utils-mockito", 86 srcs: [ 87 "utils-mockito/**/*.kt", 88 ], 89 static_libs: [ 90 "junit", 91 "mockito-target-extended-minus-junit4", 92 ], 93 libs: [ 94 "android.test.runner", 95 ], 96} 97