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", |
Colin Cross | a12c0f5 | 2018-06-27 11:00:11 -0700 | [diff] [blame] | 21 | installable: true, |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 22 | |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame] | 23 | java_version: "1.8", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 24 | srcs: ["src/**/*.java"], |
| 25 | |
| 26 | no_framework_libs: true, |
| 27 | libs: [ |
| 28 | "framework", |
Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 29 | ], |
| 30 | } |
Jiyong Park | 6964add | 2018-03-13 16:06:03 +0900 | [diff] [blame] | 31 | |
| 32 | doc_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 | |
| 56 | android_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 | |
| 61 | droiddoc { |
| 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 | |
| 72 | droiddoc { |
| 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 | |
| 84 | java_library_static { |
| 85 | name: "android.test.mock.stubs", |
| 86 | srcs: [":android.test.mock.docs"], |
| 87 | sdk_version: "current", |
Jiyong Park | 8f2df8a | 2018-03-23 17:29:05 +0900 | [diff] [blame] | 88 | product_variables: { |
| 89 | unbundled_build: { |
| 90 | // Unbundled apps will use the prebuilt one |
| 91 | // prebuilts/sdk/current |
| 92 | enabled: false, |
| 93 | }, |
| 94 | }, |
David Brazdil | f8d22de | 2018-07-11 11:56:34 +0100 | [diff] [blame] | 95 | compile_dex: true, |
Jiyong Park | 6964add | 2018-03-13 16:06:03 +0900 | [diff] [blame] | 96 | } |
| 97 | |
| 98 | java_library_static { |
| 99 | name: "android.test.mock.stubs-system", |
| 100 | srcs: [":android.test.mock.docs-system"], |
| 101 | sdk_version: "system_current", |
Jiyong Park | 8f2df8a | 2018-03-23 17:29:05 +0900 | [diff] [blame] | 102 | product_variables: { |
| 103 | unbundled_build: { |
| 104 | // Unbundled apps will use the prebuilt one |
| 105 | // prebuilts/sdk/system_current |
| 106 | enabled: false, |
| 107 | }, |
| 108 | }, |
David Brazdil | 89c6432 | 2018-06-28 10:23:50 +0100 | [diff] [blame] | 109 | compile_dex: true, |
Jiyong Park | 6964add | 2018-03-13 16:06:03 +0900 | [diff] [blame] | 110 | } |