1//
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// =====================================
19java_sdk_library {
20    name: "android.test.runner",
21
22    srcs: ["src/**/*.java"],
23
24    errorprone: {
25        javacflags: ["-Xep:DepAnn:ERROR"],
26    },
27
28    libs: [
29        "android.test.base",
30        "android.test.mock",
31    ],
32    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
43    compile_dex: true,
44    default_to_stubs: true,
45}
46
47// Build the android.test.runner-minus-junit library
48// =================================================
49// This is only intended for inclusion in the android.test.legacy static
50// library and must not be used elsewhere.
51java_library {
52    name: "android.test.runner-minus-junit",
53
54    srcs: ["src/android/**/*.java"],
55
56    sdk_version: "current",
57    libs: [
58        "android.test.base_static",
59        "android.test.mock",
60        "junit",
61    ],
62}
63
64// Build the repackaged.android.test.runner library
65// ================================================
66java_library_static {
67    name: "repackaged.android.test.runner",
68
69    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
80    sdk_version: "current",
81    libs: [
82        "android.test.base_static",
83    ],
84
85    jarjar_rules: "jarjar-rules.txt",
86    // Pin java_version until jarjar is certified to support later versions. http://b/72703434
87    java_version: "1.8",
88}
89
90// 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}
101