Colin Cross | fc7ba9e | 2017-12-07 13:11:06 -0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2016 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 | |
Wei Li | 4cf550d | 2024-03-07 21:27:35 -0800 | [diff] [blame] | 17 | package { |
| 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 19 | } |
| 20 | |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 21 | // Build the android.test.base library |
| 22 | // =================================== |
| 23 | // This contains the junit.framework and android.test classes that were in |
| 24 | // Android API level 25 excluding those from android.test.runner. |
| 25 | // Also contains the com.android.internal.util.Predicate[s] classes. |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 26 | java_sdk_library { |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 27 | name: "android.test.base", |
| 28 | |
Wei Li | 4cf550d | 2024-03-07 21:27:35 -0800 | [diff] [blame] | 29 | srcs: [ |
| 30 | ":android-test-base-sources", |
| 31 | ":frameworks-base-test-junit-framework", |
| 32 | ], |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 33 | |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 34 | errorprone: { |
Paul Duffin | cd35de3 | 2019-05-30 15:12:47 +0100 | [diff] [blame] | 35 | javacflags: ["-Xep:DepAnn:ERROR"], |
Paul Duffin | 2d86c7a | 2018-02-16 13:11:05 +0000 | [diff] [blame] | 36 | }, |
| 37 | |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 38 | hostdex: true, |
| 39 | |
| 40 | api_packages: [ |
| 41 | "android.test", |
| 42 | "android.test.suitebuilder.annotation", |
| 43 | "com.android.internal.util", |
| 44 | "junit.framework", |
| 45 | ], |
| 46 | |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 47 | compile_dex: true, |
Jiyong Park | 912db8d | 2020-05-29 10:51:18 +0900 | [diff] [blame] | 48 | default_to_stubs: true, |
Paul Duffin | 6766896 | 2021-01-27 11:32:54 +0000 | [diff] [blame] | 49 | |
| 50 | // Additional hiddenapi annotations are provided in a separate module. |
| 51 | // TODO(b/180295980) - investigate whether this can be removed |
| 52 | hiddenapi_additional_annotations: [ |
| 53 | "android.test.base-hiddenapi-annotations", |
| 54 | ], |
Colin Cross | 5959ec0 | 2021-05-10 10:38:53 -0700 | [diff] [blame] | 55 | dist_group: "android", |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | // Build the android.test.base_static library |
| 59 | // ========================================== |
Paul Duffin | f404f1d | 2022-01-31 17:15:49 +0000 | [diff] [blame] | 60 | // This is only intended for use by the android.test.runner-minus-junit |
| 61 | // library. |
| 62 | // |
Paul Duffin | 79d7ba2 | 2019-02-25 19:18:37 +0000 | [diff] [blame] | 63 | // Must not be used elsewhere. |
Paul Duffin | f404f1d | 2022-01-31 17:15:49 +0000 | [diff] [blame] | 64 | // |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 65 | java_library_static { |
| 66 | name: "android.test.base_static", |
Paul Duffin | f404f1d | 2022-01-31 17:15:49 +0000 | [diff] [blame] | 67 | visibility: [ |
| 68 | "//frameworks/base/test-runner", |
| 69 | ], |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 70 | installable: false, |
| 71 | |
Wei Li | 4cf550d | 2024-03-07 21:27:35 -0800 | [diff] [blame] | 72 | srcs: [ |
| 73 | ":android-test-base-sources", |
| 74 | ":frameworks-base-test-junit-framework", |
| 75 | ], |
Sundong Ahn | e933ced | 2018-07-31 16:54:41 +0900 | [diff] [blame] | 76 | |
| 77 | errorprone: { |
| 78 | javacflags: ["-Xep:DepAnn:ERROR"], |
| 79 | }, |
| 80 | |
Tobias Thierer | d65595a | 2018-02-05 15:49:52 +0000 | [diff] [blame] | 81 | // Needs to be consistent with the repackaged version of this make target. |
| 82 | java_version: "1.8", |
| 83 | |
Paul Duffin | 4cdec67 | 2018-02-14 10:36:16 +0000 | [diff] [blame] | 84 | sdk_version: "current", |
Paul Duffin | e95a895 | 2017-11-16 15:53:09 +0000 | [diff] [blame] | 85 | } |
| 86 | |
Paul Duffin | bee7cce | 2018-01-05 15:11:18 +0000 | [diff] [blame] | 87 | // Build the android.test.base-minus-junit library |
| 88 | // =============================================== |
| 89 | // This contains the android.test classes from android.test.base plus |
Paul Duffin | f404f1d | 2022-01-31 17:15:49 +0000 | [diff] [blame] | 90 | // the com.android.internal.util.Predicate[s] classes. |
Paul Duffin | bee7cce | 2018-01-05 15:11:18 +0000 | [diff] [blame] | 91 | java_library_static { |
| 92 | name: "android.test.base-minus-junit", |
| 93 | |
| 94 | srcs: [ |
Wei Li | 4cf550d | 2024-03-07 21:27:35 -0800 | [diff] [blame] | 95 | "src/**/*.java", |
Paul Duffin | bee7cce | 2018-01-05 15:11:18 +0000 | [diff] [blame] | 96 | ], |
| 97 | |
| 98 | sdk_version: "current", |
| 99 | libs: [ |
| 100 | "junit", |
| 101 | ], |
| 102 | } |
Nan Zhang | 3fece48 | 2018-04-13 14:48:32 -0700 | [diff] [blame] | 103 | |
Anton Hansson | 2e25fdc | 2021-05-10 12:40:05 +0100 | [diff] [blame] | 104 | filegroup { |
| 105 | name: "android-test-base-sources", |
| 106 | srcs: ["src/**/*.java"], |
| 107 | path: "src", |
| 108 | } |
| 109 | |
Nelson Li | a23f2af | 2024-01-17 06:57:58 +0000 | [diff] [blame] | 110 | // Make the current.txt available for use by the cts/tests/signature and /vendor tests. |
Paul Duffin | cd35de3 | 2019-05-30 15:12:47 +0100 | [diff] [blame] | 111 | // ======================================================================== |
| 112 | filegroup { |
| 113 | name: "android-test-base-current.txt", |
| 114 | visibility: [ |
| 115 | "//cts/tests/signature/api", |
Nelson Li | a23f2af | 2024-01-17 06:57:58 +0000 | [diff] [blame] | 116 | "//vendor:__subpackages__", |
Paul Duffin | cd35de3 | 2019-05-30 15:12:47 +0100 | [diff] [blame] | 117 | ], |
| 118 | srcs: [ |
| 119 | "api/current.txt", |
| 120 | ], |
| 121 | } |