blob: fe007e39f717566ca9c3dcbab0be9663d6aa1616 [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// =====================================
Bob Badour051ef782021-02-12 17:07:05 -080019package {
20 // See: http://go/android-license-faq
21 // A large-scale-change added 'default_applicable_licenses' to import
22 // all of the 'license_kinds' from "frameworks_base_license"
23 // to get the below license kinds:
24 // SPDX-license-identifier-Apache-2.0
25 // SPDX-license-identifier-CPL-1.0
26 default_applicable_licenses: ["frameworks_base_license"],
27}
28
Sundong Ahne933ced2018-07-31 16:54:41 +090029java_sdk_library {
Colin Crossfc7ba9e2017-12-07 13:11:06 -080030 name: "android.test.runner",
31
32 srcs: ["src/**/*.java"],
33
Paul Duffin2d86c7a2018-02-16 13:11:05 +000034 errorprone: {
Paul Duffinbedfae92018-02-22 12:16:31 +000035 javacflags: ["-Xep:DepAnn:ERROR"],
Paul Duffin2d86c7a2018-02-16 13:11:05 +000036 },
37
Colin Crossfc7ba9e2017-12-07 13:11:06 -080038 libs: [
Paul Duffine95a8952017-11-16 15:53:09 +000039 "android.test.base",
Sundong Ahne933ced2018-07-31 16:54:41 +090040 "android.test.mock",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080041 ],
Sundong Ahne933ced2018-07-31 16:54:41 +090042 stub_only_libs: [
43 "android.test.base",
44 "android.test.mock",
45 ],
46 api_packages: [
47 "android.test",
48 "android.test.suitebuilder",
49 "junit.runner",
50 "junit.textui",
51 ],
52
Paul Duffincd35de32019-05-30 15:12:47 +010053 compile_dex: true,
Jiyong Park912db8d2020-05-29 10:51:18 +090054 default_to_stubs: true,
Colin Crossfc7ba9e2017-12-07 13:11:06 -080055}
56
Paul Duffina88eb292018-01-12 16:08:35 +000057// Build the android.test.runner-minus-junit library
58// =================================================
Paul Duffin79d7ba22019-02-25 19:18:37 +000059// This is only intended for inclusion in the android.test.legacy static
Paul Duffin001d87c2018-02-14 10:36:16 +000060// library and must not be used elsewhere.
Paul Duffina88eb292018-01-12 16:08:35 +000061java_library {
62 name: "android.test.runner-minus-junit",
63
64 srcs: ["src/android/**/*.java"],
65
Jiyong Park029925a2018-02-22 14:16:35 +090066 sdk_version: "current",
Paul Duffina88eb292018-01-12 16:08:35 +000067 libs: [
Sundong Ahne933ced2018-07-31 16:54:41 +090068 "android.test.base_static",
69 "android.test.mock",
Paul Duffina88eb292018-01-12 16:08:35 +000070 "junit",
71 ],
72}
73
Colin Crossfc7ba9e2017-12-07 13:11:06 -080074// Build the repackaged.android.test.runner library
75// ================================================
76java_library_static {
77 name: "repackaged.android.test.runner",
78
Paul Duffinbedfae92018-02-22 12:16:31 +000079 srcs: ["src/**/*.java"],
80 exclude_srcs: [
81 "src/android/test/ActivityUnitTestCase.java",
82 "src/android/test/ApplicationTestCase.java",
83 "src/android/test/IsolatedContext.java",
84 "src/android/test/ProviderTestCase.java",
85 "src/android/test/ProviderTestCase2.java",
86 "src/android/test/RenamingDelegatingContext.java",
87 "src/android/test/ServiceTestCase.java",
88 ],
89
Jiyong Park029925a2018-02-22 14:16:35 +090090 sdk_version: "current",
Paul Duffinbedfae92018-02-22 12:16:31 +000091 libs: [
Sundong Ahne933ced2018-07-31 16:54:41 +090092 "android.test.base_static",
Paul Duffinbedfae92018-02-22 12:16:31 +000093 ],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080094
95 jarjar_rules: "jarjar-rules.txt",
Tobias Thiererd65595a2018-02-05 15:49:52 +000096 // Pin java_version until jarjar is certified to support later versions. http://b/72703434
97 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080098}
Nan Zhang4a139d02018-04-26 14:55:41 -070099
Paul Duffincd35de32019-05-30 15:12:47 +0100100// Make the current.txt available for use by the cts/tests/signature tests.
101// ========================================================================
102filegroup {
103 name: "android-test-runner-current.txt",
104 visibility: [
105 "//cts/tests/signature/api",
106 ],
107 srcs: [
108 "api/current.txt",
109 ],
110}