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}
45
46// Build the android.test.runner-minus-junit library
47// =================================================
48// This is only intended for inclusion in the android.test.legacy static
49// library and must not be used elsewhere.
50java_library {
51    name: "android.test.runner-minus-junit",
52
53    srcs: ["src/android/**/*.java"],
54
55    sdk_version: "current",
56    libs: [
57        "android.test.base_static",
58        "android.test.mock",
59        "junit",
60    ],
61}
62
63// Build the repackaged.android.test.runner library
64// ================================================
65java_library_static {
66    name: "repackaged.android.test.runner",
67
68    srcs: ["src/**/*.java"],
69    exclude_srcs: [
70        "src/android/test/ActivityUnitTestCase.java",
71        "src/android/test/ApplicationTestCase.java",
72        "src/android/test/IsolatedContext.java",
73        "src/android/test/ProviderTestCase.java",
74        "src/android/test/ProviderTestCase2.java",
75        "src/android/test/RenamingDelegatingContext.java",
76        "src/android/test/ServiceTestCase.java",
77    ],
78
79    sdk_version: "current",
80    libs: [
81        "android.test.base_static",
82    ],
83
84    jarjar_rules: "jarjar-rules.txt",
85    // Pin java_version until jarjar is certified to support later versions. http://b/72703434
86    java_version: "1.8",
87}
88
89