blob: 51fa86bacc75b80d1c66732d18725fa43a1e52df [file] [log] [blame]
Colin Crossfc7ba9e2017-12-07 13:11:06 -08001//
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// ===================================
19java_library {
20 name: "android.test.mock",
21
Tobias Thiererd65595a2018-02-05 15:49:52 +000022 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080023 srcs: ["src/**/*.java"],
24
25 no_framework_libs: true,
26 libs: [
27 "framework",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080028 ],
29}
Jiyong Park6964add2018-03-13 16:06:03 +090030
31doc_defaults {
32 name:"android.test.mock.docs-defaults",
33 srcs: ["src/android/test/mock/**/*.java"],
34
35 // Includes the main framework source to ensure that doclava has access to the
36 // visibility information for the base classes of the mock classes. Without it
37 // otherwise hidden methods could be visible.
38 srcs_lib: "framework",
39 srcs_lib_whitelist_dirs: ["core/java"],
40 srcs_lib_whitelist_pkgs: ["android"],
41 libs: [
42 "core-oj",
43 "core-libart",
44 "framework",
45 "conscrypt",
46 "okhttp",
47 "bouncycastle",
48 "ext",
49 ],
50 local_sourcepaths: ["src/android/test/mock"],
51 custom_template: "droiddoc-templates-sdk",
52 installable: false,
53}
54
55android_test_mock_docs_args =
56 "-hide 110 -hide 111 -hide 113 -hide 121 -hide 125 -hide 126 -hide 127 -hide 128 " +
57 "-stubpackages android.test.mock " +
58 "-nodocs "
59
60droiddoc {
61 name: "android.test.mock.docs",
62 defaults: ["android.test.mock.docs-defaults"],
63
64 api_tag_name: "ANDROID_TEST_MOCK",
65 api_filename: "api/android-test-mock-current.txt",
66 removed_api_filename: "api/android-test-mock-removed.txt",
67
68 args: android_test_mock_docs_args,
69}
70
71droiddoc {
72 name: "android.test.mock.docs-system",
73 defaults: ["android.test.mock.docs-defaults"],
74
75 api_tag_name: "ANDROID_TEST_MOCK_SYSTEM",
76 api_filename: "api/android-test-mock-system-current.txt",
77 removed_api_filename: "api/android-test-mock-system-removed.txt",
78
79 args: android_test_mock_docs_args +
80 "-showAnnotation android.annotation.SystemApi ",
81}
82
83java_library_static {
84 name: "android.test.mock.stubs",
85 srcs: [":android.test.mock.docs"],
86 sdk_version: "current",
Jiyong Park8f2df8a2018-03-23 17:29:05 +090087 product_variables: {
88 unbundled_build: {
89 // Unbundled apps will use the prebuilt one
90 // prebuilts/sdk/current
91 enabled: false,
92 },
93 },
Jiyong Park6964add2018-03-13 16:06:03 +090094}
95
96java_library_static {
97 name: "android.test.mock.stubs-system",
98 srcs: [":android.test.mock.docs-system"],
99 sdk_version: "system_current",
Jiyong Park8f2df8a2018-03-23 17:29:05 +0900100 product_variables: {
101 unbundled_build: {
102 // Unbundled apps will use the prebuilt one
103 // prebuilts/sdk/system_current
104 enabled: false,
105 },
106 },
Jiyong Park6964add2018-03-13 16:06:03 +0900107}