blob: 4d765d3e5f3f26b59e8147f8052cae3d59fb996a [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.
Sundong Ahnf24779c2018-07-31 16:54:41 +090022java_sdk_library {
Paul Duffine95a8952017-11-16 15:53:09 +000023 name: "android.test.base",
24
25 srcs: ["src/**/*.java"],
26
Paul Duffin2d86c7a2018-02-16 13:11:05 +000027 errorprone: {
28 javacflags: ["-Xep:DepAnn:ERROR"],
29 },
30
Sundong Ahnf24779c2018-07-31 16:54:41 +090031 hostdex: true,
32
33 api_packages: [
34 "android.test",
35 "android.test.suitebuilder.annotation",
36 "com.android.internal.util",
37 "junit.framework",
38 ],
39
Sundong Ahn558e7022018-09-17 15:23:14 +090040 droiddoc_options: ["-stubsourceonly"],
41 metalava_enabled: false,
Sundong Ahnf24779c2018-07-31 16:54:41 +090042 compile_dex: true,
43}
44
45// Build the android.test.base_static library
46// ==========================================
47// This is only intended for inclusion in the android.test.runner-minus-junit,
48// robolectric_android-all-stub and repackaged.android.test.* libraries.
49// Must not be used elewhere.
50java_library_static {
51 name: "android.test.base_static",
52 installable: false,
53
54 srcs: ["src/**/*.java"],
55
56 errorprone: {
57 javacflags: ["-Xep:DepAnn:ERROR"],
58 },
59
Tobias Thiererd65595a2018-02-05 15:49:52 +000060 // Needs to be consistent with the repackaged version of this make target.
61 java_version: "1.8",
62
Paul Duffin4cdec672018-02-14 10:36:16 +000063 sdk_version: "current",
Paul Duffine95a8952017-11-16 15:53:09 +000064}
65
Colin Crossfc7ba9e2017-12-07 13:11:06 -080066// Build the legacy-test library
67// =============================
68// This contains the junit.framework and android.test classes that were in
69// Android API level 25 excluding those from android.test.runner.
70// Also contains the com.android.internal.util.Predicate[s] classes.
71java_library {
72 name: "legacy-test",
Colin Crossa12c0f52018-06-27 11:00:11 -070073 installable: true,
Colin Crossfc7ba9e2017-12-07 13:11:06 -080074
Paul Duffin4cdec672018-02-14 10:36:16 +000075 sdk_version: "current",
Sundong Ahnf24779c2018-07-31 16:54:41 +090076 static_libs: ["android.test.base_static"],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080077}
78
Paul Duffine95a8952017-11-16 15:53:09 +000079// Build the repackaged.android.test.base library
80// ==============================================
Paul Duffinb36eb542018-01-15 15:47:47 +000081// This contains repackaged versions of the classes from
82// android.test.base.
Colin Crossfc7ba9e2017-12-07 13:11:06 -080083java_library_static {
Paul Duffine95a8952017-11-16 15:53:09 +000084 name: "repackaged.android.test.base",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080085
Paul Duffin4cdec672018-02-14 10:36:16 +000086 sdk_version: "current",
Sundong Ahnf24779c2018-07-31 16:54:41 +090087 static_libs: ["android.test.base_static"],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080088
89 jarjar_rules: "jarjar-rules.txt",
Tobias Thiererd65595a2018-02-05 15:49:52 +000090 // Pin java_version until jarjar is certified to support later versions. http://b/72703434
91 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080092}
93
Paul Duffinbee7cce2018-01-05 15:11:18 +000094// Build the android.test.base-minus-junit library
95// ===============================================
96// This contains the android.test classes from android.test.base plus
97// the com.android.internal.util.Predicate[s] classes. This is only
Paul Duffinf24612b2018-01-31 13:30:22 +000098// intended for inclusion in the android.test.legacy and
99// legacy-android-test static libraries and must not be used elsewhere.
Paul Duffinbee7cce2018-01-05 15:11:18 +0000100java_library_static {
101 name: "android.test.base-minus-junit",
102
103 srcs: [
104 "src/android/**/*.java",
105 "src/com/**/*.java",
106 ],
107
108 sdk_version: "current",
109 libs: [
110 "junit",
111 ],
112}
Nan Zhang3fece482018-04-13 14:48:32 -0700113