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 // This module cannot generate stubs from the api signature files as stubs depends on the 52 // private APIs, which are not visible in the api signature files. 53 build_from_text_stub: false, 54} 55 56java_library { 57 name: "android.test.mock.ravenwood", 58 defaults: ["ravenwood-internal-only-visibility-java"], 59 srcs: [":android-test-mock-sources"], 60} 61 62android_ravenwood_test { 63 name: "android.test.mock.ravenwood.tests", 64 libs: [ 65 "android.test.mock.ravenwood", 66 ], 67 static_libs: [ 68 "androidx.annotation_annotation", 69 "androidx.test.rules", 70 ], 71 srcs: [ 72 "tests/**/*.java", 73 ], 74 auto_gen_config: true, 75} 76 77// Make the current.txt available for use by the cts/tests/signature and /vendor tests. 78// ======================================================================== 79filegroup { 80 name: "android-test-mock-current.txt", 81 visibility: [ 82 "//cts/tests/signature/api", 83 "//vendor:__subpackages__", 84 ], 85 srcs: [ 86 "api/current.txt", 87 ], 88} 89 90filegroup { 91 name: "android-test-mock-sources", 92 srcs: ["src/**/*.java"], 93 path: "src", 94} 95