blob: d25b47727c0ba1a83a591d9e87ffef5bcee26840 [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
Paul Duffine95a8952017-11-16 15:53:09 +000017// 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.
22java_library {
23 name: "android.test.base",
Colin Crossa12c0f52018-06-27 11:00:11 -070024 installable: true,
Paul Duffine95a8952017-11-16 15:53:09 +000025
26 srcs: ["src/**/*.java"],
27
Paul Duffin2d86c7a2018-02-16 13:11:05 +000028 errorprone: {
29 javacflags: ["-Xep:DepAnn:ERROR"],
30 },
31
Tobias Thiererd65595a2018-02-05 15:49:52 +000032 // Needs to be consistent with the repackaged version of this make target.
33 java_version: "1.8",
34
Paul Duffin4cdec672018-02-14 10:36:16 +000035 sdk_version: "current",
Paul Duffine95a8952017-11-16 15:53:09 +000036 hostdex: true,
Paul Duffine95a8952017-11-16 15:53:09 +000037}
38
Colin Crossfc7ba9e2017-12-07 13:11:06 -080039// Build the legacy-test library
40// =============================
41// This contains the junit.framework and android.test classes that were in
42// Android API level 25 excluding those from android.test.runner.
43// Also contains the com.android.internal.util.Predicate[s] classes.
44java_library {
45 name: "legacy-test",
Colin Crossa12c0f52018-06-27 11:00:11 -070046 installable: true,
Colin Crossfc7ba9e2017-12-07 13:11:06 -080047
Paul Duffin4cdec672018-02-14 10:36:16 +000048 sdk_version: "current",
49 static_libs: ["android.test.base"],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080050}
51
Paul Duffine95a8952017-11-16 15:53:09 +000052// Build the repackaged.android.test.base library
53// ==============================================
Paul Duffinb36eb542018-01-15 15:47:47 +000054// This contains repackaged versions of the classes from
55// android.test.base.
Colin Crossfc7ba9e2017-12-07 13:11:06 -080056java_library_static {
Paul Duffine95a8952017-11-16 15:53:09 +000057 name: "repackaged.android.test.base",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080058
Paul Duffin4cdec672018-02-14 10:36:16 +000059 sdk_version: "current",
Paul Duffine95a8952017-11-16 15:53:09 +000060 static_libs: ["android.test.base"],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080061
62 jarjar_rules: "jarjar-rules.txt",
Tobias Thiererd65595a2018-02-05 15:49:52 +000063 // Pin java_version until jarjar is certified to support later versions. http://b/72703434
64 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080065}
66
Paul Duffinbee7cce2018-01-05 15:11:18 +000067// Build the android.test.base-minus-junit library
68// ===============================================
69// This contains the android.test classes from android.test.base plus
70// the com.android.internal.util.Predicate[s] classes. This is only
Paul Duffinf24612b2018-01-31 13:30:22 +000071// intended for inclusion in the android.test.legacy and
72// legacy-android-test static libraries and must not be used elsewhere.
Paul Duffinbee7cce2018-01-05 15:11:18 +000073java_library_static {
74 name: "android.test.base-minus-junit",
75
76 srcs: [
77 "src/android/**/*.java",
78 "src/com/**/*.java",
79 ],
80
81 sdk_version: "current",
82 libs: [
83 "junit",
84 ],
85}
Nan Zhang3fece482018-04-13 14:48:32 -070086
87droiddoc {
88 name: "android-test-base-api-stubs-gen-docs",
89 srcs: [
90 "src/**/*.java",
91 ],
92 custom_template: "droiddoc-templates-sdk",
93 installable: false,
94 args: "-stubpackages android.test:" +
95 "android.test.suitebuilder.annotation:" +
96 "com.android.internal.util:" +
97 "junit.framework -stubsourceonly -nodocs",
98 sdk_version: "current",
99 api_tag_name: "ANDROID_TEST_BASE",
100 api_filename: "android-test-base-api.txt",
101 removed_api_filename: "android-test-base-removed.txt",
102}
103
104// Build the android.test.base.stubs library
105// =========================================
106java_library_static {
107 name: "android.test.base.stubs",
108 srcs: [
109 ":android-test-base-api-stubs-gen-docs",
110 ],
111 product_variables: {
112 pdk: {
113 enabled: false,
114 },
115 unbundled_build: {
116 enabled: false,
117 },
118 },
119 sdk_version: "current",
David Brazdil89c64322018-06-28 10:23:50 +0100120 compile_dex: true,
Nan Zhang3fece482018-04-13 14:48:32 -0700121}