blob: 1f6db8403eee43f0f1062ba7086797a67e3e6f92 [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// =====================================
Sundong Ahne933ced2018-07-31 16:54:41 +090019java_sdk_library {
Colin Crossfc7ba9e2017-12-07 13:11:06 -080020 name: "android.test.runner",
21
22 srcs: ["src/**/*.java"],
23
Paul Duffin2d86c7a2018-02-16 13:11:05 +000024 errorprone: {
Paul Duffinbedfae92018-02-22 12:16:31 +000025 javacflags: ["-Xep:DepAnn:ERROR"],
Paul Duffin2d86c7a2018-02-16 13:11:05 +000026 },
27
Colin Crossfc7ba9e2017-12-07 13:11:06 -080028 libs: [
Paul Duffine95a8952017-11-16 15:53:09 +000029 "android.test.base",
Sundong Ahne933ced2018-07-31 16:54:41 +090030 "android.test.mock",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080031 ],
Sundong Ahne933ced2018-07-31 16:54:41 +090032 stub_only_libs: [
33 "android.test.base",
34 "android.test.mock",
35 ],
36 api_packages: [
37 "android.test",
38 "android.test.suitebuilder",
39 "junit.runner",
40 "junit.textui",
41 ],
42
Paul Duffincd35de32019-05-30 15:12:47 +010043 compile_dex: true,
Jiyong Park912db8d2020-05-29 10:51:18 +090044 default_to_stubs: true,
Colin Crossfc7ba9e2017-12-07 13:11:06 -080045}
46
Paul Duffina88eb292018-01-12 16:08:35 +000047// Build the android.test.runner-minus-junit library
48// =================================================
Paul Duffin79d7ba22019-02-25 19:18:37 +000049// This is only intended for inclusion in the android.test.legacy static
Paul Duffin001d87c2018-02-14 10:36:16 +000050// library and must not be used elsewhere.
Paul Duffina88eb292018-01-12 16:08:35 +000051java_library {
52 name: "android.test.runner-minus-junit",
53
54 srcs: ["src/android/**/*.java"],
55
Jiyong Park029925a2018-02-22 14:16:35 +090056 sdk_version: "current",
Paul Duffina88eb292018-01-12 16:08:35 +000057 libs: [
Sundong Ahne933ced2018-07-31 16:54:41 +090058 "android.test.base_static",
59 "android.test.mock",
Paul Duffina88eb292018-01-12 16:08:35 +000060 "junit",
61 ],
62}
63
Colin Crossfc7ba9e2017-12-07 13:11:06 -080064// Build the repackaged.android.test.runner library
65// ================================================
66java_library_static {
67 name: "repackaged.android.test.runner",
68
Paul Duffinbedfae92018-02-22 12:16:31 +000069 srcs: ["src/**/*.java"],
70 exclude_srcs: [
71 "src/android/test/ActivityUnitTestCase.java",
72 "src/android/test/ApplicationTestCase.java",
73 "src/android/test/IsolatedContext.java",
74 "src/android/test/ProviderTestCase.java",
75 "src/android/test/ProviderTestCase2.java",
76 "src/android/test/RenamingDelegatingContext.java",
77 "src/android/test/ServiceTestCase.java",
78 ],
79
Jiyong Park029925a2018-02-22 14:16:35 +090080 sdk_version: "current",
Paul Duffinbedfae92018-02-22 12:16:31 +000081 libs: [
Sundong Ahne933ced2018-07-31 16:54:41 +090082 "android.test.base_static",
Paul Duffinbedfae92018-02-22 12:16:31 +000083 ],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080084
85 jarjar_rules: "jarjar-rules.txt",
Tobias Thiererd65595a2018-02-05 15:49:52 +000086 // Pin java_version until jarjar is certified to support later versions. http://b/72703434
87 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080088}
Nan Zhang4a139d02018-04-26 14:55:41 -070089
Paul Duffincd35de32019-05-30 15:12:47 +010090// Make the current.txt available for use by the cts/tests/signature tests.
91// ========================================================================
92filegroup {
93 name: "android-test-runner-current.txt",
94 visibility: [
95 "//cts/tests/signature/api",
96 ],
97 srcs: [
98 "api/current.txt",
99 ],
100}