1// 2// Copyright (C) 2010 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 // See: http://go/android-license-faq 19 default_applicable_licenses: [ 20 "cts_apps_CtsVerifier_opencv_license", 21 "Android-Apache-2.0", 22 "cts_apps_CtsVerifier_fatcow_license", 23 ], 24} 25 26license { 27 name: "cts_apps_CtsVerifier_opencv_license", 28 package_name: "opencv", 29 license_kinds: [ 30 "SPDX-license-identifier-BSD", 31 ], 32 license_text: [ 33 "libs/opencv-android_LICENSE", 34 "res/raw/opencv_library_license", 35 ], 36} 37 38// See: src/com/android/cts/verifier/features/FeatureSummaryActivity.java 39license { 40 name: "cts_apps_CtsVerifier_fatcow_license", 41 package_name: "fatcow icons", 42 license_kinds: [ 43 "SPDX-license-identifier-CC-BY-3.0", 44 ], 45 license_text: ["LICENSE_CC_BY"], 46} 47 48filegroup { 49 name: "CtsVerifierMockVrListenerServiceFiles", 50 srcs: ["src/com/android/cts/verifier/vr/MockVrListenerService.java"], 51} 52 53android_library { 54 name: "CtsVerifierLibT", 55 defaults: ["cts_error_prone_rules_tests"], 56 57 srcs: [ 58 "src/**/*.java", 59 "src/**/*.kt", 60 "src/**/I*.aidl", 61 ], 62 exclude_srcs: [ 63 "src/com/android/cts/verifier/camera/its/*", 64 ], 65 66 aidl: { 67 include_dirs: ["frameworks/native/aidl/gui"], 68 }, 69 70 static_libs: [ 71 "android.media.audio-aconfig-java", 72 "android.service.chooser.flags-aconfig-java", 73 "android-ex-camera2", 74 "compatibility-common-util-devicesidelib", 75 "cts-sensors-tests", 76 "cts-camera-performance-tests", 77 "ctstestrunner-axt", 78 "apache-commons-math", 79 "androidplot", 80 "ctsverifier-opencv", 81 "core-tests-support", 82 "androidx.appcompat_appcompat", 83 "androidx.fragment_fragment", 84 "androidx.preference_preference", 85 "mockito-target-minus-junit4", 86 "mockwebserver", 87 "compatibility-device-util-axt", 88 "platform-test-annotations", 89 "cts-security-test-support-library", 90 "cts-midi-lib", 91 "cbor-java", 92 "CtsCameraUtils", 93 "androidx.legacy_legacy-support-v4", 94 "CtsForceStopHelper-constants", 95 "ctsmediautil", 96 "DpmWrapper", 97 "MediaPerformanceClassCommon", 98 "mediapc-requirements", 99 "com_android_wm_shell_flags_lib", 100 "its-service", 101 ], 102 103 libs: [ 104 "telephony-common", 105 "android.test.runner.stubs", 106 "android.test.base.stubs", 107 "android.test.mock.stubs", 108 "android.car-test-stubs", 109 "voip-common", 110 "truth", 111 ], 112 113 platform_apis: true, 114 115 optimize: { 116 proguard_flags_files: ["proguard.flags"], 117 }, 118 119 dex_preopt: { 120 enabled: false, 121 }, 122} 123 124android_test { 125 name: "CtsVerifier", 126 static_libs: [ 127 "CtsVerifierLibT", 128 ], 129 130 compile_multilib: "both", 131 132 additional_manifests: ["AndroidManifest-verifierConfig.xml"], 133 134 jni_libs: [ 135 "libctsverifier_jni", 136 "libctsnativemidi_jni", 137 "libaudioloopback_jni", 138 "libmegaaudio_jni", 139 ], 140} 141 142// opencv library 143java_import { 144 name: "ctsverifier-opencv", 145 jars: ["libs/opencv3-android.jar"], 146} 147 148// Build CTS verifier framework as a library. 149android_library { 150 name: "cts-verifier-framework", 151 152 sdk_version: "test_current", 153 min_sdk_version: "29", 154 resource_dirs: ["res"], 155 srcs: [ 156 "src/com/android/cts/verifier/*.java", 157 "src/**/I*.aidl", 158 ], 159 static_libs: [ 160 "androidx.legacy_legacy-support-v4", 161 "compatibility-common-util-devicesidelib", 162 "compatibility-device-util-axt", 163 ], 164} 165 166// Build ItsService as a library 167android_library { 168 name: "its-service", 169 170 sdk_version: "test_current", 171 min_sdk_version: "34", 172 resource_dirs: ["res"], 173 srcs: [ 174 "src/com/android/cts/verifier/camera/its/*.java", 175 "src/com/android/cts/verifier/camera/performance/*.java", 176 ], 177 178 static_libs: [ 179 "android-ex-camera2", 180 "cts-camera-performance-tests", 181 "cts-verifier-framework", 182 "ctstestrunner-axt", 183 "androidx.appcompat_appcompat", 184 "CtsCameraUtils", 185 "MediaPerformanceClassCommon", 186 "mediapc-requirements", 187 ], 188} 189 190filegroup { 191 name: "pre_installed_apps", 192 device_first_srcs: [ 193 ":CtsDefaultNotesApp", 194 ":CtsDeviceControlsApp", 195 ":CtsEmptyDeviceAdmin", 196 ":CtsEmptyDeviceOwner", 197 ":CtsPermissionApp", 198 ":CtsForceStopHelper", 199 ":NotificationBot", 200 ":CrossProfileTestApp", 201 ":CtsTtsEngineSelectorTestHelper", 202 ":CtsTtsEngineSelectorTestHelper2", 203 ], 204} 205 206// Apps to be installed as Instant App using adb install --instant 207filegroup { 208 name: "pre_installed_instant_app", 209 device_first_srcs: [ 210 ":CtsVerifierInstantApp", 211 ], 212} 213 214filegroup { 215 name: "other_required_apps", 216 device_first_srcs: [ 217 ":CameraFeatureCombinationVerifier", 218 ":CtsCarWatchdogCompanionApp", 219 ":CtsTileServiceApp", 220 ":CtsVerifierUSBCompanion", 221 ":CtsVpnFirewallAppApi23", 222 ":CtsVpnFirewallAppApi24", 223 ":CtsVpnFirewallAppNotAlwaysOn", 224 ":jetpack-camera-app", 225 ], 226} 227 228filegroup { 229 name: "cts_apps_to_include", 230 srcs: [ 231 ":pre_installed_apps", 232 ":pre_installed_instant_app", 233 ":other_required_apps", 234 ], 235} 236 237// 238// Creates a "cts-verifier" directory that will contain: 239// 240// 1. Out directory with a "android-cts-verifier" containing the CTS Verifier 241// and other binaries it needs. 242// 243// 2. Zipped version of the android-cts-verifier directory to be included with 244// the build distribution. 245// 246genrule { 247 name: "android-cts-verifier", 248 srcs: [ 249 ":cts_apps_to_include", 250 ":camera-its", 251 ":camera-webcam-test", 252 ], 253 device_common_srcs: [ 254 ":android-cts-verifier-notice", 255 ":CtsVerifier", 256 ":multidevice-test", 257 ], 258 tools: [ 259 "soong_zip", 260 "merge_zips", 261 ], 262 out: ["android-cts-verifier.zip"], 263 cmd: "echo $(locations :cts_apps_to_include) $(location :CtsVerifier) $(location :android-cts-verifier-notice) > $(genDir)/list &&" + 264 " $(location soong_zip) -o $(genDir)/cts-verifier.zip -j -P android-cts-verifier -l $(genDir)/list &&" + 265 " $(location merge_zips) $(out) $(genDir)/cts-verifier.zip $(location :camera-its) $(location :camera-webcam-test) $(location :multidevice-test)", 266 dists: [ 267 { 268 targets: ["cts"], 269 }, 270 ], 271} 272 273gen_notice { 274 name: "android-cts-verifier-notice", 275 for: ["android-cts-verifier"], 276 stem: "NOTICE", 277 suffix: ".txt", 278} 279 280filegroup { 281 name: "android-cts-verifier-for-make", 282 srcs: [":android-cts-verifier"], 283 export_to_make_var: "SOONG_ANDROID_CTS_VERIFIER_ZIP", 284} 285