Debian Codegraph @

test-base/Android.bp

raw
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
17 // Build the android.test.base library
18 // ===================================
19 // This contains the junit.framework and android.test classes that were in
20 // Android API level 25 excluding those from android.test.runner.
21 // Also contains the com.android.internal.util.Predicate[s] classes.
22 package {
23 // See: http://go/android-license-faq
24 // A large-scale-change added 'default_applicable_licenses' to import
25 // all of the 'license_kinds' from "frameworks_base_license"
26 // to get the below license kinds:
27 // SPDX-license-identifier-Apache-2.0
28 // SPDX-license-identifier-CPL-1.0
29 default_applicable_licenses: ["frameworks_base_test-base_license"],
30 }
31
32 license {
33 name: "frameworks_base_test-base_license",
34 visibility: [":__subpackages__"],
35 license_kinds: [
36 "SPDX-license-identifier-Apache-2.0",
37 "SPDX-license-identifier-CPL-1.0",
38 ],
39 license_text: [
40 "src/junit/cpl-v10.html",
41 ],
42 }
43
44 java_sdk_library {
45 name: "android.test.base",
46
47 srcs: [":android-test-base-sources"],
48
49 errorprone: {
50 javacflags: ["-Xep:DepAnn:ERROR"],
51 },
52
53 hostdex: true,
54
55 api_packages: [
56 "android.test",
57 "android.test.suitebuilder.annotation",
58 "com.android.internal.util",
59 "junit.framework",
60 ],
61
62 compile_dex: true,
63 default_to_stubs: true,
64
65 // Additional hiddenapi annotations are provided in a separate module.
66 // TODO(b/180295980) - investigate whether this can be removed
67 hiddenapi_additional_annotations: [
68 "android.test.base-hiddenapi-annotations",
69 ],
70 dist_group: "android",
71 }
72
73 // Build the android.test.base_static library
74 // ==========================================
75 // This is only intended for use by the android.test.runner-minus-junit
76 // library.
77 //
78 // Must not be used elsewhere.
79 //
80 java_library_static {
81 name: "android.test.base_static",
82 visibility: [
83 "//frameworks/base/test-runner",
84 ],
85 installable: false,
86
87 srcs: [":android-test-base-sources"],
88
89 errorprone: {
90 javacflags: ["-Xep:DepAnn:ERROR"],
91 },
92
93 // Needs to be consistent with the repackaged version of this make target.
94 java_version: "1.8",
95
96 sdk_version: "current",
97 }
98
99 // Build the android.test.base-minus-junit library
100 // ===============================================
101 // This contains the android.test classes from android.test.base plus
102 // the com.android.internal.util.Predicate[s] classes.
103 java_library_static {
104 name: "android.test.base-minus-junit",
105
106 srcs: [
107 "src/android/**/*.java",
108 "src/com/**/*.java",
109 ],
110
111 sdk_version: "current",
112 libs: [
113 "junit",
114 ],
115 }
116
117 filegroup {
118 name: "android-test-base-sources",
119 srcs: ["src/**/*.java"],
120 path: "src",
121 }
122
123 // Make the current.txt available for use by the cts/tests/signature tests.
124 // ========================================================================
125 filegroup {
126 name: "android-test-base-current.txt",
127 visibility: [
128 "//cts/tests/signature/api",
129 ],
130 srcs: [
131 "api/current.txt",
132 ],
133 }