1// 2// Copyright (C) 2016 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 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21// Build the android.test.base library 22// =================================== 23// This contains the junit.framework and android.test classes that were in 24// Android API level 25 excluding those from android.test.runner. 25// Also contains the com.android.internal.util.Predicate[s] classes. 26java_sdk_library { 27 name: "android.test.base", 28 29 srcs: [ 30 ":android-test-base-sources", 31 ":frameworks-base-test-junit-framework", 32 ], 33 34 errorprone: { 35 javacflags: ["-Xep:DepAnn:ERROR"], 36 }, 37 38 hostdex: true, 39 40 api_packages: [ 41 "android.test", 42 "android.test.suitebuilder.annotation", 43 "com.android.internal.util", 44 "junit.framework", 45 ], 46 47 compile_dex: true, 48 default_to_stubs: true, 49 50 // Additional hiddenapi annotations are provided in a separate module. 51 // TODO(b/180295980) - investigate whether this can be removed 52 hiddenapi_additional_annotations: [ 53 "android.test.base-hiddenapi-annotations", 54 ], 55 dist_group: "android", 56} 57 58// Build the android.test.base_static library 59// ========================================== 60// This is only intended for use by the android.test.runner-minus-junit 61// library. 62// 63// Must not be used elsewhere. 64// 65java_library_static { 66 name: "android.test.base_static", 67 visibility: [ 68 "//frameworks/base/test-runner", 69 ], 70 installable: false, 71 72 srcs: [ 73 ":android-test-base-sources", 74 ":frameworks-base-test-junit-framework", 75 ], 76 77 errorprone: { 78 javacflags: ["-Xep:DepAnn:ERROR"], 79 }, 80 81 // Needs to be consistent with the repackaged version of this make target. 82 java_version: "1.8", 83 84 sdk_version: "current", 85} 86 87// Build the android.test.base-minus-junit library 88// =============================================== 89// This contains the android.test classes from android.test.base plus 90// the com.android.internal.util.Predicate[s] classes. 91java_library_static { 92 name: "android.test.base-minus-junit", 93 94 srcs: [ 95 "src/**/*.java", 96 ], 97 98 sdk_version: "current", 99 libs: [ 100 "junit", 101 ], 102} 103 104filegroup { 105 name: "android-test-base-sources", 106 srcs: ["src/**/*.java"], 107 path: "src", 108} 109 110// Make the current.txt available for use by the cts/tests/signature and /vendor tests. 111// ======================================================================== 112filegroup { 113 name: "android-test-base-current.txt", 114 visibility: [ 115 "//cts/tests/signature/api", 116 "//vendor:__subpackages__", 117 ], 118 srcs: [ 119 "api/current.txt", 120 ], 121} 122