1// 2// Copyright (C) 2008 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 17// Build the android.test.mock library 18// =================================== 19package { 20 default_applicable_licenses: ["Android-Apache-2.0"], 21} 22 23java_sdk_library { 24 name: "android.test.mock", 25 srcs: [":android-test-mock-sources"], 26 api_srcs: [ 27 // Note: Below are NOT APIs of this library. We only take APIs under 28 // the android.test.mock package. They however provide private APIs that 29 // android.test.mock APIs references to. We need to have the classes in 30 // source code form to have access to the @hide comment which disappears 31 // when the classes are compiled into a Jar library. 32 ":framework-core-sources-for-test-mock", 33 ":framework_native_aidl", 34 ], 35 libs: [ 36 "framework", 37 "framework-annotations-lib", 38 "app-compat-annotations", 39 "unsupportedappusage", 40 ], 41 api_packages: [ 42 "android.test.mock", 43 ], 44 permitted_packages: [ 45 "android.test.mock", 46 ], 47 compile_dex: true, 48 default_to_stubs: true, 49 dist_group: "android", 50} 51 52java_library { 53 name: "android.test.mock.ravenwood", 54 srcs: [":android-test-mock-sources"], 55 visibility: [ 56 "//frameworks/base", 57 ], 58} 59 60android_ravenwood_test { 61 name: "android.test.mock.ravenwood.tests", 62 libs: [ 63 "android.test.mock.ravenwood", 64 ], 65 static_libs: [ 66 "androidx.annotation_annotation", 67 "androidx.test.rules", 68 ], 69 srcs: [ 70 "tests/**/*.java", 71 ], 72 auto_gen_config: true, 73} 74 75// Make the current.txt available for use by the cts/tests/signature and /vendor tests. 76// ======================================================================== 77filegroup { 78 name: "android-test-mock-current.txt", 79 visibility: [ 80 "//cts/tests/signature/api", 81 "//vendor:__subpackages__", 82 ], 83 srcs: [ 84 "api/current.txt", 85 ], 86} 87 88filegroup { 89 name: "android-test-mock-sources", 90 srcs: ["src/**/*.java"], 91 path: "src", 92} 93