• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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// =====================================
19package {
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
29java_sdk_library {
30    name: "android.test.runner",
31
32    srcs: [":android-test-runner-sources"],
33
34    errorprone: {
35        javacflags: ["-Xep:DepAnn:ERROR"],
36    },
37
38    libs: [
39        "android.test.base",
40        "android.test.mock",
41    ],
42    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
53    compile_dex: true,
54    default_to_stubs: true,
55    dist_group: "android",
56}
57
58// Build the android.test.runner-minus-junit library
59// =================================================
60// This is only intended for inclusion in the android.test.legacy static
61// library and must not be used elsewhere.
62java_library {
63    name: "android.test.runner-minus-junit",
64
65    srcs: ["src/android/**/*.java"],
66
67    sdk_version: "current",
68    libs: [
69        "android.test.base_static",
70        "android.test.mock",
71        "junit",
72    ],
73}
74
75// Build the repackaged.android.test.runner library
76// ================================================
77java_library_static {
78    name: "repackaged.android.test.runner",
79
80    srcs: [":android-test-runner-sources"],
81    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
91    sdk_version: "current",
92    libs: [
93        "android.test.base_static",
94    ],
95
96    jarjar_rules: "jarjar-rules.txt",
97    // Pin java_version until jarjar is certified to support later versions. http://b/72703434
98    java_version: "1.8",
99}
100
101// 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}
112
113filegroup {
114    name: "android-test-runner-sources",
115    srcs: ["src/**/*.java"],
116    path: "src",
117}
118