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