blob: d65a4e44440e8e1b94d2a0b0f901394efebf3861 [file] [log] [blame]
Colin Crossfc7ba9e2017-12-07 13:11:06 -08001//
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 Li4cf550d2024-03-07 21:27:35 -080017package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
Paul Duffine95a8952017-11-16 15:53:09 +000021// 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 Ahne933ced2018-07-31 16:54:41 +090026java_sdk_library {
Paul Duffine95a8952017-11-16 15:53:09 +000027 name: "android.test.base",
28
Wei Li4cf550d2024-03-07 21:27:35 -080029 srcs: [
30 ":android-test-base-sources",
31 ":frameworks-base-test-junit-framework",
32 ],
Paul Duffine95a8952017-11-16 15:53:09 +000033
Paul Duffin2d86c7a2018-02-16 13:11:05 +000034 errorprone: {
Paul Duffincd35de32019-05-30 15:12:47 +010035 javacflags: ["-Xep:DepAnn:ERROR"],
Paul Duffin2d86c7a2018-02-16 13:11:05 +000036 },
37
Sundong Ahne933ced2018-07-31 16:54:41 +090038 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 Ahne933ced2018-07-31 16:54:41 +090047 compile_dex: true,
Jiyong Park912db8d2020-05-29 10:51:18 +090048 default_to_stubs: true,
Paul Duffin67668962021-01-27 11:32:54 +000049
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 Cross5959ec02021-05-10 10:38:53 -070055 dist_group: "android",
Sundong Ahne933ced2018-07-31 16:54:41 +090056}
57
58// Build the android.test.base_static library
59// ==========================================
Paul Duffinf404f1d2022-01-31 17:15:49 +000060// This is only intended for use by the android.test.runner-minus-junit
61// library.
62//
Paul Duffin79d7ba22019-02-25 19:18:37 +000063// Must not be used elsewhere.
Paul Duffinf404f1d2022-01-31 17:15:49 +000064//
Sundong Ahne933ced2018-07-31 16:54:41 +090065java_library_static {
66 name: "android.test.base_static",
Paul Duffinf404f1d2022-01-31 17:15:49 +000067 visibility: [
68 "//frameworks/base/test-runner",
69 ],
Sundong Ahne933ced2018-07-31 16:54:41 +090070 installable: false,
71
Wei Li4cf550d2024-03-07 21:27:35 -080072 srcs: [
73 ":android-test-base-sources",
74 ":frameworks-base-test-junit-framework",
75 ],
Sundong Ahne933ced2018-07-31 16:54:41 +090076
77 errorprone: {
78 javacflags: ["-Xep:DepAnn:ERROR"],
79 },
80
Tobias Thiererd65595a2018-02-05 15:49:52 +000081 // Needs to be consistent with the repackaged version of this make target.
82 java_version: "1.8",
83
Paul Duffin4cdec672018-02-14 10:36:16 +000084 sdk_version: "current",
Paul Duffine95a8952017-11-16 15:53:09 +000085}
86
Paul Duffinbee7cce2018-01-05 15:11:18 +000087// Build the android.test.base-minus-junit library
88// ===============================================
89// This contains the android.test classes from android.test.base plus
Paul Duffinf404f1d2022-01-31 17:15:49 +000090// the com.android.internal.util.Predicate[s] classes.
Paul Duffinbee7cce2018-01-05 15:11:18 +000091java_library_static {
92 name: "android.test.base-minus-junit",
93
94 srcs: [
Wei Li4cf550d2024-03-07 21:27:35 -080095 "src/**/*.java",
Paul Duffinbee7cce2018-01-05 15:11:18 +000096 ],
97
98 sdk_version: "current",
99 libs: [
100 "junit",
101 ],
102}
Nan Zhang3fece482018-04-13 14:48:32 -0700103
Anton Hansson2e25fdc2021-05-10 12:40:05 +0100104filegroup {
105 name: "android-test-base-sources",
106 srcs: ["src/**/*.java"],
107 path: "src",
108}
109
Nelson Lia23f2af2024-01-17 06:57:58 +0000110// Make the current.txt available for use by the cts/tests/signature and /vendor tests.
Paul Duffincd35de32019-05-30 15:12:47 +0100111// ========================================================================
112filegroup {
113 name: "android-test-base-current.txt",
114 visibility: [
115 "//cts/tests/signature/api",
Nelson Lia23f2af2024-01-17 06:57:58 +0000116 "//vendor:__subpackages__",
Paul Duffincd35de32019-05-30 15:12:47 +0100117 ],
118 srcs: [
119 "api/current.txt",
120 ],
121}