blob: c0eb489d5ab333ad0452e773a812a30cd88de30a [file] [log] [blame]
Colin Crossfc7ba9e2017-12-07 13:11:06 -08001//
2// Copyright (C) 2008 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.runner library
18// =====================================
19java_library {
20 name: "android.test.runner",
Colin Crossa12c0f52018-06-27 11:00:11 -070021 installable: true,
Colin Crossfc7ba9e2017-12-07 13:11:06 -080022
Tobias Thiererd65595a2018-02-05 15:49:52 +000023 // Needs to be consistent with the repackaged version of this make target.
24 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080025 srcs: ["src/**/*.java"],
26
Paul Duffin2d86c7a2018-02-16 13:11:05 +000027 errorprone: {
28 javacflags: ["-Xep:DepAnn:ERROR"],
29 },
30
Colin Crossfc7ba9e2017-12-07 13:11:06 -080031 no_framework_libs: true,
32 libs: [
33 "framework",
Paul Duffine95a8952017-11-16 15:53:09 +000034 "android.test.base",
Jiyong Park3fb22452018-03-13 16:06:03 +090035 "android.test.mock.stubs",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080036 ],
37}
38
Paul Duffina88eb292018-01-12 16:08:35 +000039// Build the android.test.runner-minus-junit library
40// =================================================
Paul Duffin4cdec672018-02-14 10:36:16 +000041// This is only intended for inclusion in the legacy-android-test static
42// library and must not be used elsewhere.
Paul Duffina88eb292018-01-12 16:08:35 +000043java_library {
44 name: "android.test.runner-minus-junit",
45
46 srcs: ["src/android/**/*.java"],
47
48 no_framework_libs: true,
49 libs: [
50 "framework",
Paul Duffinb36eb542018-01-15 15:47:47 +000051 "android.test.base",
Jiyong Park3fb22452018-03-13 16:06:03 +090052 "android.test.mock.stubs",
Paul Duffina88eb292018-01-12 16:08:35 +000053 "junit",
54 ],
55}
56
Colin Crossfc7ba9e2017-12-07 13:11:06 -080057// Build the repackaged.android.test.runner library
58// ================================================
59java_library_static {
60 name: "repackaged.android.test.runner",
61
62 static_libs: ["android.test.runner"],
63
64 jarjar_rules: "jarjar-rules.txt",
Tobias Thiererd65595a2018-02-05 15:49:52 +000065 // Pin java_version until jarjar is certified to support later versions. http://b/72703434
66 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080067}
Nan Zhang4a139d02018-04-26 14:55:41 -070068
69droiddoc {
70 name: "android-test-runner-api-stubs-gen-docs",
71 srcs: [
72 "src/**/*.java",
73 ],
74 libs: [
75 "core-oj",
76 "core-libart",
77 "framework",
78 "android.test.base",
79 "android.test.mock",
80 ],
81 custom_template: "droiddoc-templates-sdk",
82 installable: false,
83 args: "-stubpackages android.test:" +
84 "android.test.suitebuilder:" +
85 "junit.runner:" +
86 "junit.textui -stubsourceonly -nodocs",
87 api_tag_name: "ANDROID_TEST_RUNNER",
88 api_filename: "android-test-runner-current.txt",
89 removed_api_filename: "android-test-runner-removed.txt",
90}
91
92// Build the android.test.runner.stubs library
93// =========================================
94java_library_static {
95 name: "android.test.runner.stubs",
96 srcs: [
97 ":android-test-runner-api-stubs-gen-docs",
98 ],
99 libs: [
100 "android.test.base.stubs",
101 "android.test.mock.stubs",
102 ],
103 product_variables: {
104 pdk: {
105 enabled: false,
106 },
107 unbundled_build: {
108 enabled: false,
109 },
110 },
111 sdk_version: "current",
112}