1// Copyright (C) 2019 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19java_defaults { 20 name: "DocumentsUITests-defaults", 21 libs: [ 22 "android.test.base.stubs.system", 23 "android.test.mock.stubs.system", 24 "android.test.runner.stubs.system", 25 ], 26 27 static_libs: [ 28 "androidx.test.core", 29 "androidx.test.espresso.core", 30 "androidx.test.ext.truth", 31 "androidx.test.rules", 32 "androidx.test.ext.junit", 33 "androidx.test.uiautomator_uiautomator", 34 "docsui-flags-aconfig-java-lib", 35 "flag-junit", 36 "guava", 37 "mockito-target", 38 ], 39} 40 41android_library { 42 name: "DocumentsUIPerfTests-lib", 43 srcs: [ 44 "common/com/android/documentsui/**/*.java", 45 "common/com/android/documentsui/**/*.kt", 46 "functional/com/android/documentsui/ActivityTest.java", 47 ], 48 resource_dirs: [], 49 libs: [ 50 "android.test.base.stubs.system", 51 "android.test.mock.stubs.system", 52 "android.test.runner.stubs.system", 53 "DocumentsUI-lib", 54 ], 55 56 static_libs: [ 57 "androidx.legacy_legacy-support-v4", 58 "androidx.test.espresso.core", 59 "androidx.test.rules", 60 "androidx.test.uiautomator_uiautomator", 61 "mockito-target", 62 "ub-janktesthelper", 63 ], 64} 65 66android_library { 67 name: "DocumentsUIUnitTests-lib", 68 defaults: ["DocumentsUITests-defaults"], 69 70 manifest: "AndroidManifestUnitTests.xml", 71 72 srcs: [ 73 "common/**/*.java", 74 "common/**/*.kt", 75 "unit/**/*.java", 76 "unit/**/*.kt", 77 ], 78 79 libs: [ 80 "DocumentsUI-lib", 81 ], 82 83 resource_dirs: [ 84 "res", 85 ], 86 87 min_sdk_version: "30", 88 target_sdk_version: "30", 89} 90 91android_library { 92 name: "DocumentsUITests-lib", 93 defaults: ["DocumentsUITests-defaults"], 94 95 manifest: "AndroidManifest.xml", 96 97 srcs: [ 98 "common/**/*.java", 99 "common/**/*.kt", 100 "functional/**/*.java", 101 "functional/**/*.kt", 102 "unit/**/*.java", 103 "unit/**/*.kt", 104 ], 105 106 libs: [ 107 "DocumentsUI-lib", 108 ], 109 110 asset_dirs: [ 111 "assets", 112 ], 113 114 resource_dirs: [ 115 "res", 116 ], 117 118 aaptflags: [ 119 // pack some raw file locate in assets folder 120 "-0 .zip", 121 ], 122 123 min_sdk_version: "30", 124 target_sdk_version: "30", 125 lint: { 126 baseline_filename: "lint-baseline.xml", 127 }, 128} 129 130android_test { 131 name: "DocumentsUITests", 132 defaults: ["DocumentsUITests-defaults"], 133 134 manifest: "AndroidManifest.xml", 135 136 resource_dirs: [], 137 138 static_libs: [ 139 "DocumentsUITests-lib", 140 ], 141 142 jarjar_rules: "jarjar-rules.txt", 143 144 test_suites: [ 145 "device-tests", 146 "mts-documentsui", 147 ], 148 149 platform_apis: true, 150 151 certificate: "platform", 152 153 instrumentation_for: "DocumentsUI", 154 min_sdk_version: "30", 155 target_sdk_version: "30", 156} 157