blob: 9b2c16a3d098ea895e64206ceec327c9b0b4ad85 [file] [log] [blame]
//
// Copyright (C) 2010 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package {
// See: http://go/android-license-faq
default_applicable_licenses: [
"cts_apps_CtsVerifier_opencv_license",
"Android-Apache-2.0",
"cts_apps_CtsVerifier_fatcow_license",
],
}
license {
name: "cts_apps_CtsVerifier_opencv_license",
package_name: "opencv",
license_kinds: [
"SPDX-license-identifier-BSD",
],
license_text: [
"libs/opencv-android_LICENSE",
"res/raw/opencv_library_license",
],
}
// See: src/com/android/cts/verifier/features/FeatureSummaryActivity.java
license {
name: "cts_apps_CtsVerifier_fatcow_license",
package_name: "fatcow icons",
license_kinds: [
"SPDX-license-identifier-CC-BY-3.0",
],
license_text: ["LICENSE_CC_BY"],
}
filegroup {
name: "CtsVerifierNotice",
srcs: ["NOTICE.txt"],
}
filegroup {
name: "CtsVerifierMockVrListenerServiceFiles",
srcs: ["src/com/android/cts/verifier/vr/MockVrListenerService.java"],
}
android_library {
name: "CtsVerifierLibT",
defaults: ["cts_error_prone_rules_tests"],
srcs: [
"src/**/*.java",
"src/**/I*.aidl",
],
aidl: {
include_dirs: ["frameworks/native/aidl/gui"],
},
static_libs: [
"android-ex-camera2",
"compatibility-common-util-devicesidelib",
"cts-sensors-tests",
"cts-camera-performance-tests",
"ctstestrunner-axt",
"apache-commons-math",
"androidplot",
"ctsverifier-opencv",
"core-tests-support",
"androidx.legacy_legacy-support-v4",
"mockito-target-minus-junit4",
"mockwebserver",
"compatibility-device-util-axt",
"platform-test-annotations",
"cts-security-test-support-library",
"cts-midi-lib",
"cbor-java",
"CtsCameraUtils",
"androidx.legacy_legacy-support-v4",
"CtsForceStopHelper-constants",
"ctsmediautil",
"DpmWrapper",
],
libs: ["telephony-common"] + ["android.test.runner.stubs"] + ["android.test.base.stubs"] + ["android.test.mock.stubs"] + ["android.car-test-stubs"] + ["voip-common"] + ["truth-prebuilt"],
platform_apis: true,
optimize: {
proguard_flags_files: ["proguard.flags"],
},
dex_preopt: {
enabled: false,
},
}
android_test {
name: "CtsVerifier",
static_libs: [
"CtsVerifierLibT",
],
compile_multilib: "both",
additional_manifests: ["AndroidManifest-verifierConfig.xml"],
jni_libs: [
"libctsverifier_jni",
"libctsnativemidi_jni",
"libaudioloopback_jni",
"libmegaaudio_jni",
],
}
// opencv library
java_import {
name: "ctsverifier-opencv",
jars: ["libs/opencv3-android.jar"],
}
// Build CTS verifier framework as a library.
android_library {
name: "cts-verifier-framework",
sdk_version: "current",
min_sdk_version: "29",
resource_dirs: ["res"],
srcs: [
"src/com/android/cts/verifier/*.java",
"src/**/I*.aidl",
],
static_libs: [
"androidx.legacy_legacy-support-v4",
"compatibility-common-util-devicesidelib",
"compatibility-device-util-axt",
],
}
filegroup {
name: "pre_installed_apps",
srcs: [
":CtsEmptyDeviceAdmin",
":CtsEmptyDeviceOwner",
":CtsPermissionApp",
":CtsForceStopHelper",
":NotificationBot",
":CrossProfileTestApp",
":CtsTtsEngineSelectorTestHelper",
":CtsTtsEngineSelectorTestHelper2",
],
}
// Apps to be installed as Instant App using adb install --instant
filegroup {
name: "pre_installed_instant_app",
srcs: [
":CtsVerifierInstantApp",
],
}
filegroup {
name: "other_required_apps",
srcs: [
":CtsCarWatchdogCompanionApp",
":CtsTileServiceApp",
":CtsVerifierUSBCompanion",
":CtsVpnFirewallAppApi23",
":CtsVpnFirewallAppApi24",
":CtsVpnFirewallAppNotAlwaysOn",
],
}
filegroup {
name: "cts_apps_to_include",
srcs: [
":pre_installed_apps",
":pre_installed_instant_app",
":other_required_apps",
],
}
//
// Creates a "cts-verifier" directory that will contain:
//
// 1. Out directory with a "android-cts-verifier" containing the CTS Verifier
// and other binaries it needs.
//
// 2. Zipped version of the android-cts-verifier directory to be included with
// the build distribution.
//
genrule {
name: "android-cts-verifier",
srcs: [
":cts_apps_to_include",
":CtsVerifier",
":camera-its",
":CtsVerifierNotice",
],
tools: [
"soong_zip",
"merge_zips",
],
out: ["android-cts-verifier.zip"],
cmd: "echo $(locations :cts_apps_to_include) $(location :CtsVerifier) $(location :CtsVerifierNotice) > $(genDir)/list &&" +
" $(location soong_zip) -o $(genDir)/cts-verifier.zip -j -P android-cts-verifier -l $(genDir)/list &&" +
" $(location merge_zips) $(out) $(genDir)/cts-verifier.zip $(location :camera-its)",
dists: [
{
targets: ["cts"],
},
],
}
filegroup {
name: "android-cts-verifier-for-make",
srcs: [":android-cts-verifier"],
export_to_make_var: "SOONG_ANDROID_CTS_VERIFIER_ZIP",
}