blob: 6b5be3cba20478106a75dfdf5cab778b5cdcd26e [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
Wei Li4cf550d2024-03-07 21:27:35 -080017package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
Colin Crossfc7ba9e2017-12-07 13:11:06 -080021// Build the android.test.runner library
22// =====================================
Sundong Ahne933ced2018-07-31 16:54:41 +090023java_sdk_library {
Colin Crossfc7ba9e2017-12-07 13:11:06 -080024 name: "android.test.runner",
25
Wei Li4cf550d2024-03-07 21:27:35 -080026 srcs: [
27 ":android-test-runner-sources",
28 ":frameworks-base-test-junit-runner",
29 ],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080030
Paul Duffin2d86c7a2018-02-16 13:11:05 +000031 errorprone: {
Paul Duffinbedfae92018-02-22 12:16:31 +000032 javacflags: ["-Xep:DepAnn:ERROR"],
Paul Duffin2d86c7a2018-02-16 13:11:05 +000033 },
34
Colin Crossfc7ba9e2017-12-07 13:11:06 -080035 libs: [
Paul Duffine95a8952017-11-16 15:53:09 +000036 "android.test.base",
Sundong Ahne933ced2018-07-31 16:54:41 +090037 "android.test.mock",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080038 ],
Sundong Ahne933ced2018-07-31 16:54:41 +090039 stub_only_libs: [
40 "android.test.base",
41 "android.test.mock",
42 ],
43 api_packages: [
44 "android.test",
45 "android.test.suitebuilder",
46 "junit.runner",
47 "junit.textui",
48 ],
49
Paul Duffincd35de32019-05-30 15:12:47 +010050 compile_dex: true,
Jiyong Park912db8d2020-05-29 10:51:18 +090051 default_to_stubs: true,
Colin Cross5959ec02021-05-10 10:38:53 -070052 dist_group: "android",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080053}
54
Paul Duffina88eb292018-01-12 16:08:35 +000055// Build the android.test.runner-minus-junit library
56// =================================================
Paul Duffin79d7ba22019-02-25 19:18:37 +000057// This is only intended for inclusion in the android.test.legacy static
Paul Duffin001d87c2018-02-14 10:36:16 +000058// library and must not be used elsewhere.
Paul Duffina88eb292018-01-12 16:08:35 +000059java_library {
60 name: "android.test.runner-minus-junit",
61
62 srcs: ["src/android/**/*.java"],
63
Jiyong Park029925a2018-02-22 14:16:35 +090064 sdk_version: "current",
Paul Duffina88eb292018-01-12 16:08:35 +000065 libs: [
Sundong Ahne933ced2018-07-31 16:54:41 +090066 "android.test.base_static",
67 "android.test.mock",
Paul Duffina88eb292018-01-12 16:08:35 +000068 "junit",
69 ],
70}
71
Nelson Lia23f2af2024-01-17 06:57:58 +000072// Make the current.txt available for use by the cts/tests/signature and /vendor tests.
Paul Duffincd35de32019-05-30 15:12:47 +010073// ========================================================================
74filegroup {
75 name: "android-test-runner-current.txt",
76 visibility: [
77 "//cts/tests/signature/api",
Nelson Lia23f2af2024-01-17 06:57:58 +000078 "//vendor:__subpackages__",
Paul Duffincd35de32019-05-30 15:12:47 +010079 ],
80 srcs: [
81 "api/current.txt",
82 ],
83}
Anton Hansson2e25fdc2021-05-10 12:40:05 +010084
85filegroup {
86 name: "android-test-runner-sources",
87 srcs: ["src/**/*.java"],
88 path: "src",
89}