• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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: "CtsVerifierNotice",
50    srcs: ["NOTICE.txt"],
51}
52
53filegroup {
54    name: "CtsVerifierMockVrListenerServiceFiles",
55    srcs: ["src/com/android/cts/verifier/vr/MockVrListenerService.java"],
56}
57
58android_library {
59    name: "CtsVerifierLibT",
60    defaults: ["cts_error_prone_rules_tests"],
61
62    srcs: [
63        "src/**/*.java",
64        "src/**/I*.aidl",
65    ],
66
67    aidl: {
68        include_dirs: ["frameworks/native/aidl/gui"],
69    },
70
71    static_libs: [
72        "android-ex-camera2",
73        "compatibility-common-util-devicesidelib",
74        "cts-sensors-tests",
75        "cts-camera-performance-tests",
76        "ctstestrunner-axt",
77        "apache-commons-math",
78        "androidplot",
79        "ctsverifier-opencv",
80        "core-tests-support",
81        "androidx.legacy_legacy-support-v4",
82        "mockito-target-minus-junit4",
83        "mockwebserver",
84        "compatibility-device-util-axt",
85        "platform-test-annotations",
86        "cts-security-test-support-library",
87        "cts-midi-lib",
88        "cbor-java",
89        "CtsCameraUtils",
90        "androidx.legacy_legacy-support-v4",
91        "CtsForceStopHelper-constants",
92        "ctsmediautil",
93        "DpmWrapper",
94        "MediaPerformanceClassCommon",
95    ],
96
97    libs: ["telephony-common"] + ["android.test.runner.stubs"] + ["android.test.base.stubs"] + ["android.test.mock.stubs"] + ["android.car-test-stubs"] + ["voip-common"] + ["truth-prebuilt"],
98
99    platform_apis: true,
100
101    optimize: {
102        proguard_flags_files: ["proguard.flags"],
103    },
104
105    dex_preopt: {
106        enabled: false,
107    },
108}
109
110android_test {
111    name: "CtsVerifier",
112    static_libs: [
113        "CtsVerifierLibT",
114    ],
115
116    compile_multilib: "both",
117
118    additional_manifests: ["AndroidManifest-verifierConfig.xml"],
119
120    jni_libs: [
121        "libctsverifier_jni",
122        "libctsnativemidi_jni",
123        "libaudioloopback_jni",
124        "libmegaaudio_jni",
125    ],
126}
127
128// opencv library
129java_import {
130    name: "ctsverifier-opencv",
131    jars: ["libs/opencv3-android.jar"],
132}
133
134// Build CTS verifier framework as a library.
135android_library {
136    name: "cts-verifier-framework",
137
138    sdk_version: "current",
139    min_sdk_version: "29",
140    resource_dirs: ["res"],
141    srcs: [
142        "src/com/android/cts/verifier/*.java",
143        "src/**/I*.aidl",
144    ],
145
146    static_libs: [
147        "androidx.legacy_legacy-support-v4",
148        "compatibility-common-util-devicesidelib",
149        "compatibility-device-util-axt",
150    ],
151
152}
153
154filegroup {
155    name: "pre_installed_apps",
156    srcs: [
157        ":CtsEmptyDeviceAdmin",
158        ":CtsEmptyDeviceOwner",
159        ":CtsPermissionApp",
160        ":CtsForceStopHelper",
161        ":NotificationBot",
162        ":CrossProfileTestApp",
163        ":CtsTtsEngineSelectorTestHelper",
164        ":CtsTtsEngineSelectorTestHelper2",
165    ],
166}
167
168// Apps to be installed as Instant App using adb install --instant
169filegroup {
170    name: "pre_installed_instant_app",
171    srcs: [
172        ":CtsVerifierInstantApp",
173    ],
174}
175
176filegroup {
177    name: "other_required_apps",
178    srcs: [
179        ":CtsCarWatchdogCompanionApp",
180        ":CtsTileServiceApp",
181        ":CtsVerifierUSBCompanion",
182        ":CtsVpnFirewallAppApi23",
183        ":CtsVpnFirewallAppApi24",
184        ":CtsVpnFirewallAppNotAlwaysOn",
185    ],
186}
187
188filegroup {
189    name: "cts_apps_to_include",
190    srcs: [
191        ":pre_installed_apps",
192        ":pre_installed_instant_app",
193        ":other_required_apps",
194    ],
195}
196
197//
198// Creates a "cts-verifier" directory that will contain:
199//
200// 1. Out directory with a "android-cts-verifier" containing the CTS Verifier
201//    and other binaries it needs.
202//
203// 2. Zipped version of the android-cts-verifier directory to be included with
204//    the build distribution.
205//
206genrule {
207    name: "android-cts-verifier",
208    srcs: [
209        ":cts_apps_to_include",
210        ":CtsVerifier",
211        ":camera-its",
212        ":CtsVerifierNotice",
213    ],
214    tools: [
215        "soong_zip",
216        "merge_zips",
217    ],
218    out: ["android-cts-verifier.zip"],
219    cmd: "echo $(locations :cts_apps_to_include) $(location :CtsVerifier) $(location :CtsVerifierNotice) > $(genDir)/list &&" +
220        " $(location soong_zip) -o $(genDir)/cts-verifier.zip -j -P android-cts-verifier -l $(genDir)/list &&" +
221        " $(location merge_zips) $(out) $(genDir)/cts-verifier.zip $(location :camera-its)",
222    dists: [
223        {
224            targets: ["cts"],
225        },
226    ],
227}
228
229filegroup {
230    name: "android-cts-verifier-for-make",
231    srcs: [":android-cts-verifier"],
232    export_to_make_var: "SOONG_ANDROID_CTS_VERIFIER_ZIP",
233}
234