blob: 0f56bb3819f1fe01d332a2eaf3c4c89328cf4e86 [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
Anton Hansson2e25fdc2021-05-10 12:40:05 +010032 srcs: [":android-test-runner-sources"],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080033
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 Crossfe090912021-05-10 10:38:53 -070055 dist_group: "android",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080056}
57
Paul Duffina88eb292018-01-12 16:08:35 +000058// Build the android.test.runner-minus-junit library
59// =================================================
Paul Duffin79d7ba22019-02-25 19:18:37 +000060// This is only intended for inclusion in the android.test.legacy static
Paul Duffin001d87c2018-02-14 10:36:16 +000061// library and must not be used elsewhere.
Paul Duffina88eb292018-01-12 16:08:35 +000062java_library {
63 name: "android.test.runner-minus-junit",
64
65 srcs: ["src/android/**/*.java"],
66
Jiyong Park029925a2018-02-22 14:16:35 +090067 sdk_version: "current",
Paul Duffina88eb292018-01-12 16:08:35 +000068 libs: [
Sundong Ahne933ced2018-07-31 16:54:41 +090069 "android.test.base_static",
70 "android.test.mock",
Paul Duffina88eb292018-01-12 16:08:35 +000071 "junit",
72 ],
73}
74
Colin Crossfc7ba9e2017-12-07 13:11:06 -080075// Build the repackaged.android.test.runner library
76// ================================================
77java_library_static {
78 name: "repackaged.android.test.runner",
79
Anton Hansson2e25fdc2021-05-10 12:40:05 +010080 srcs: [":android-test-runner-sources"],
Paul Duffinbedfae92018-02-22 12:16:31 +000081 exclude_srcs: [
82 "src/android/test/ActivityUnitTestCase.java",
83 "src/android/test/ApplicationTestCase.java",
84 "src/android/test/IsolatedContext.java",
85 "src/android/test/ProviderTestCase.java",
86 "src/android/test/ProviderTestCase2.java",
87 "src/android/test/RenamingDelegatingContext.java",
88 "src/android/test/ServiceTestCase.java",
89 ],
90
Jiyong Park029925a2018-02-22 14:16:35 +090091 sdk_version: "current",
Paul Duffinbedfae92018-02-22 12:16:31 +000092 libs: [
Sundong Ahne933ced2018-07-31 16:54:41 +090093 "android.test.base_static",
Paul Duffinbedfae92018-02-22 12:16:31 +000094 ],
Colin Crossfc7ba9e2017-12-07 13:11:06 -080095
96 jarjar_rules: "jarjar-rules.txt",
Tobias Thiererd65595a2018-02-05 15:49:52 +000097 // Pin java_version until jarjar is certified to support later versions. http://b/72703434
98 java_version: "1.8",
Colin Crossfc7ba9e2017-12-07 13:11:06 -080099}
Nan Zhang4a139d02018-04-26 14:55:41 -0700100
Paul Duffincd35de32019-05-30 15:12:47 +0100101// Make the current.txt available for use by the cts/tests/signature tests.
102// ========================================================================
103filegroup {
104 name: "android-test-runner-current.txt",
105 visibility: [
106 "//cts/tests/signature/api",
107 ],
108 srcs: [
109 "api/current.txt",
110 ],
111}
Anton Hansson2e25fdc2021-05-10 12:40:05 +0100112
113filegroup {
114 name: "android-test-runner-sources",
115 srcs: ["src/**/*.java"],
116 path: "src",
117}