blob: 848fd7c2199e110bf27b89f05d7da32eb2d3f241 [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 // Needs to be consistent with the repackaged version of this make target.
24 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080025 srcs: ["src/**/*.java"],
26
27 no_framework_libs: true,
28 libs: [
29 "framework",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080030 ],
31}
32
33// Build the repackaged.android.test.mock library
34// ==============================================
35java_library_static {
36 name: "repackaged.android.test.mock",
37
38 static_libs: ["android.test.mock"],
39
40 jarjar_rules: "jarjar-rules.txt",
Tobias Thiererd65595a2018-02-05 15:49:52 +000041 // Pin java_version until jarjar is certified to support later versions. http://b/72703434
42 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080043}
Jiyong Park3fb22452018-03-13 16:06:03 +090044
45doc_defaults {
46 name:"android.test.mock.docs-defaults",
47 srcs: ["src/android/test/mock/**/*.java"],
48
49 // Includes the main framework source to ensure that doclava has access to the
50 // visibility information for the base classes of the mock classes. Without it
51 // otherwise hidden methods could be visible.
52 srcs_lib: "framework",
53 srcs_lib_whitelist_dirs: ["core/java"],
54 srcs_lib_whitelist_pkgs: ["android"],
55 libs: [
56 "core-oj",
57 "core-libart",
58 "framework",
59 "conscrypt",
60 "okhttp",
61 "bouncycastle",
62 "ext",
63 ],
64 local_sourcepaths: ["src/android/test/mock"],
65 custom_template: "droiddoc-templates-sdk",
66 installable: false,
67}
68
69android_test_mock_docs_args =
70 "-hide 110 -hide 111 -hide 113 -hide 121 -hide 125 -hide 126 -hide 127 -hide 128 " +
71 "-stubpackages android.test.mock " +
72 "-nodocs "
73
74droiddoc {
75 name: "android.test.mock.docs",
76 defaults: ["android.test.mock.docs-defaults"],
77
78 api_tag_name: "ANDROID_TEST_MOCK",
79 api_filename: "api/android-test-mock-current.txt",
80 removed_api_filename: "api/android-test-mock-removed.txt",
81
82 args: android_test_mock_docs_args,
83}
84
85java_library_static {
86 name: "android.test.mock.stubs",
87 srcs: [":android.test.mock.docs"],
88 sdk_version: "current",
89}