Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 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 | // =================================== |
| 19 | java_library { |
| 20 | name: "android.test.mock", |
| 21 | |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame] | 22 | java_version: "1.8", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 23 | srcs: ["src/**/*.java"], |
| 24 | |
| 25 | no_framework_libs: true, |
| 26 | libs: [ |
| 27 | "framework", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 28 | ], |
| 29 | } |
Jiyong Park | e649b80 | 2018-03-13 16:06:03 +0900 | [diff] [blame] | 30 | |
| 31 | doc_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 | |
| 55 | android_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 | |
| 60 | droiddoc { |
| 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 | |
| 71 | droiddoc { |
| 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 | |
| 83 | java_library_static { |
| 84 | name: "android.test.mock.stubs", |
| 85 | srcs: [":android.test.mock.docs"], |
| 86 | sdk_version: "current", |
Jiyong Park | ea93a9e | 2018-03-23 17:29:05 +0900 | [diff] [blame] | 87 | product_variables: { |
| 88 | unbundled_build: { |
| 89 | // Unbundled apps will use the prebuilt one |
| 90 | // prebuilts/sdk/current |
| 91 | enabled: false, |
| 92 | }, |
| 93 | }, |
Jiyong Park | e649b80 | 2018-03-13 16:06:03 +0900 | [diff] [blame] | 94 | } |
| 95 | |
| 96 | java_library_static { |
| 97 | name: "android.test.mock.stubs-system", |
| 98 | srcs: [":android.test.mock.docs-system"], |
| 99 | sdk_version: "system_current", |
Jiyong Park | ea93a9e | 2018-03-23 17:29:05 +0900 | [diff] [blame] | 100 | product_variables: { |
| 101 | unbundled_build: { |
| 102 | // Unbundled apps will use the prebuilt one |
| 103 | // prebuilts/sdk/system_current |
| 104 | enabled: false, |
| 105 | }, |
| 106 | }, |
Jiyong Park | e649b80 | 2018-03-13 16:06:03 +0900 | [diff] [blame] | 107 | } |