blob: 2a19af9f8cd2e6a841119770b17f0a5b47472f2f [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
Colin Crossc1309ec2022-01-10 21:16:59 -080021 default_applicable_licenses: ["frameworks_base_test-runner_license"],
22}
23
24license {
25 name: "frameworks_base_test-runner_license",
26 visibility: [":__subpackages__"],
27 license_kinds: [
28 "SPDX-license-identifier-Apache-2.0",
29 "SPDX-license-identifier-CPL-1.0",
30 ],
31 license_text: [
32 "src/junit/cpl-v10.html",
33 ],
Bob Badour051ef782021-02-12 17:07:05 -080034}
35
Sundong Ahne933ced2018-07-31 16:54:41 +090036java_sdk_library {
Colin Crossfc7ba9e2017-12-07 13:11:06 -080037 name: "android.test.runner",
38
Anton Hansson2e25fdc2021-05-10 12:40:05 +010039 srcs: [":android-test-runner-sources"],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080040
Paul Duffin2d86c7a2018-02-16 13:11:05 +000041 errorprone: {
Paul Duffinbedfae92018-02-22 12:16:31 +000042 javacflags: ["-Xep:DepAnn:ERROR"],
Paul Duffin2d86c7a2018-02-16 13:11:05 +000043 },
44
Colin Crossfc7ba9e2017-12-07 13:11:06 -080045 libs: [
Paul Duffine95a8952017-11-16 15:53:09 +000046 "android.test.base",
Sundong Ahne933ced2018-07-31 16:54:41 +090047 "android.test.mock",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080048 ],
Sundong Ahne933ced2018-07-31 16:54:41 +090049 stub_only_libs: [
50 "android.test.base",
51 "android.test.mock",
52 ],
53 api_packages: [
54 "android.test",
55 "android.test.suitebuilder",
56 "junit.runner",
57 "junit.textui",
58 ],
59
Paul Duffincd35de32019-05-30 15:12:47 +010060 compile_dex: true,
Jiyong Park912db8d2020-05-29 10:51:18 +090061 default_to_stubs: true,
Colin Cross5959ec02021-05-10 10:38:53 -070062 dist_group: "android",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080063}
64
Paul Duffina88eb292018-01-12 16:08:35 +000065// Build the android.test.runner-minus-junit library
66// =================================================
Paul Duffin79d7ba22019-02-25 19:18:37 +000067// This is only intended for inclusion in the android.test.legacy static
Paul Duffin001d87c2018-02-14 10:36:16 +000068// library and must not be used elsewhere.
Paul Duffina88eb292018-01-12 16:08:35 +000069java_library {
70 name: "android.test.runner-minus-junit",
71
72 srcs: ["src/android/**/*.java"],
73
Jiyong Park029925a2018-02-22 14:16:35 +090074 sdk_version: "current",
Paul Duffina88eb292018-01-12 16:08:35 +000075 libs: [
Sundong Ahne933ced2018-07-31 16:54:41 +090076 "android.test.base_static",
77 "android.test.mock",
Paul Duffina88eb292018-01-12 16:08:35 +000078 "junit",
79 ],
80}
81
Colin Crossfc7ba9e2017-12-07 13:11:06 -080082// Build the repackaged.android.test.runner library
83// ================================================
84java_library_static {
85 name: "repackaged.android.test.runner",
86
Anton Hansson2e25fdc2021-05-10 12:40:05 +010087 srcs: [":android-test-runner-sources"],
Paul Duffinbedfae92018-02-22 12:16:31 +000088 exclude_srcs: [
89 "src/android/test/ActivityUnitTestCase.java",
90 "src/android/test/ApplicationTestCase.java",
91 "src/android/test/IsolatedContext.java",
92 "src/android/test/ProviderTestCase.java",
93 "src/android/test/ProviderTestCase2.java",
94 "src/android/test/RenamingDelegatingContext.java",
95 "src/android/test/ServiceTestCase.java",
96 ],
97
Jiyong Park029925a2018-02-22 14:16:35 +090098 sdk_version: "current",
Paul Duffinbedfae92018-02-22 12:16:31 +000099 libs: [
Sundong Ahne933ced2018-07-31 16:54:41 +0900100 "android.test.base_static",
Paul Duffinbedfae92018-02-22 12:16:31 +0000101 ],
Colin Crossfc7ba9e2017-12-07 13:11:06 -0800102
103 jarjar_rules: "jarjar-rules.txt",
Tobias Thiererd65595a2018-02-05 15:49:52 +0000104 // Pin java_version until jarjar is certified to support later versions. http://b/72703434
105 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -0800106}
Nan Zhang4a139d02018-04-26 14:55:41 -0700107
Paul Duffincd35de32019-05-30 15:12:47 +0100108// Make the current.txt available for use by the cts/tests/signature tests.
109// ========================================================================
110filegroup {
111 name: "android-test-runner-current.txt",
112 visibility: [
113 "//cts/tests/signature/api",
114 ],
115 srcs: [
116 "api/current.txt",
117 ],
118}
Anton Hansson2e25fdc2021-05-10 12:40:05 +0100119
120filegroup {
121 name: "android-test-runner-sources",
122 srcs: ["src/**/*.java"],
123 path: "src",
124}