blob: b52ad2d72c3aa446e9584dcbceff30928aa568bc [file] [log] [blame]
Jason Monka2f2d822018-08-13 11:10:48 -04001//
2// Copyright (C) 2018 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
Bob Badour8a6a2bc2021-02-12 17:07:05 -080017package {
18 default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
19}
20
21// Added automatically by a large-scale-change
22// See: http://go/android-license-faq
23license {
24 name: "frameworks_base_packages_SystemUI_license",
25 visibility: [":__subpackages__"],
26 license_kinds: [
27 "SPDX-license-identifier-Apache-2.0",
28 ],
29 license_text: [
30 "NOTICE",
31 ],
32}
33
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010034// Opt-in configuration for code depending on Jetpack Compose.
35soong_config_module_type {
36 name: "systemui_compose_java_defaults",
37 module_type: "java_defaults",
38 config_namespace: "ANDROID",
39 bool_variables: ["SYSTEMUI_USE_COMPOSE"],
40 properties: [
41 "srcs",
42 "static_libs",
43 ],
44}
45
46systemui_compose_java_defaults {
47 name: "SystemUI_compose_defaults",
48 soong_config_variables: {
49 SYSTEMUI_USE_COMPOSE: {
50 // Because files in compose/features/ depend on SystemUI
51 // code, we compile those files when compiling SystemUI-core.
52 // We also compile the ComposeFacade in
53 // compose/facade/enabled/.
54 srcs: [
55 "compose/features/src/**/*.kt",
56 "compose/facade/enabled/src/**/*.kt",
57 ],
58
59 // The dependencies needed by SystemUIComposeFeatures,
60 // except for SystemUI-core.
61 // Copied from compose/features/Android.bp.
62 static_libs: [
Jordan Demeulenaere8a1747d2022-12-28 11:11:42 +010063 "PlatformComposeCore",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010064
65 "androidx.compose.runtime_runtime",
66 "androidx.compose.material3_material3",
Jordan Demeulenaerebf43b1d2022-12-16 13:00:23 +010067 "androidx.activity_activity-compose",
Jordan Demeulenaere0bbebad2023-07-06 10:19:49 +020068 "androidx.compose.animation_animation-graphics",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010069 ],
70
71 // By default, Compose is disabled and we compile the ComposeFacade
72 // in compose/facade/disabled/.
73 conditions_default: {
74 srcs: ["compose/facade/disabled/src/**/*.kt"],
75 static_libs: [],
76 },
77 },
78 },
79}
80
Jason Monka2f2d822018-08-13 11:10:48 -040081java_library {
82 name: "SystemUI-proto",
83
84 srcs: ["src/**/*.proto"],
85
86 proto: {
87 type: "nano",
88 },
Winson Chungeb1aa3d2020-08-25 19:02:29 -070089
90 libs: [
91 "WindowManager-Shell-proto",
92 ],
Jason Monka2f2d822018-08-13 11:10:48 -040093}
94
95java_library {
96 name: "SystemUI-tags",
97 srcs: ["src/com/android/systemui/EventLogTags.logtags"],
98}
99
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400100filegroup {
101 name: "ReleaseJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400102 srcs: [
103 "src-release/**/*.kt",
104 "src-release/**/*.java",
105 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400106}
107
108filegroup {
109 name: "DebugJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400110 srcs: [
111 "src-debug/**/*.kt",
112 "src-debug/**/*.java",
113 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400114}
115
Xiaozhen Lin53063042022-11-23 02:18:08 +0000116//Create a library to expose SystemUI's resources to other modules.
117android_library {
118 name: "SystemUI-res",
119 resource_dirs: [
120 "res-product",
121 "res-keyguard",
122 "res",
123 ],
124 static_libs: [
125 "SystemUISharedLib",
Hawkwood Glazier057df3a2023-06-14 20:10:21 +0000126 "SystemUICustomizationLib",
Xiaozhen Lin53063042022-11-23 02:18:08 +0000127 "SettingsLib",
128 "androidx.leanback_leanback",
129 "androidx.slice_slice-core",
130 "androidx.slice_slice-view",
131 ],
132 manifest: "AndroidManifest-res.xml",
133}
134
Jason Monka2f2d822018-08-13 11:10:48 -0400135android_library {
136 name: "SystemUI-core",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100137 defaults: [
138 "SystemUI_compose_defaults",
139 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400140 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -0400141 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -0400142 "src/**/*.java",
143 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -0400144 ":ReleaseJavaFiles",
Jason Monka2f2d822018-08-13 11:10:48 -0400145 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400146 product_variables: {
147 debuggable: {
148 srcs: [":DebugJavaFiles"],
149 exclude_srcs: [":ReleaseJavaFiles"],
150 },
151 },
Jason Monka2f2d822018-08-13 11:10:48 -0400152 resource_dirs: [
Sunny Goyalb4a26012019-12-05 15:49:41 -0800153 "res-product",
Jason Monka2f2d822018-08-13 11:10:48 -0400154 "res-keyguard",
155 "res",
156 ],
157 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700158 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800159 "WindowManager-Shell",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200160 "SystemUIAnimationLib",
Darrell Shi60006322023-04-06 17:58:40 +0000161 "SystemUICommon",
162 "SystemUICustomizationLib",
Darrell Shi1a21b362023-04-28 19:51:44 +0000163 "SystemUILogLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400164 "SystemUIPluginLib",
165 "SystemUISharedLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800166 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400167 "SettingsLib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700168 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500169 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400170 "androidx.legacy_legacy-support-v4",
171 "androidx.recyclerview_recyclerview",
172 "androidx.preference_preference",
173 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500174 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400175 "androidx.mediarouter_mediarouter",
176 "androidx.palette_palette",
177 "androidx.legacy_legacy-preference-v14",
178 "androidx.leanback_leanback",
179 "androidx.slice_slice-core",
180 "androidx.slice_slice-view",
181 "androidx.slice_slice-builders",
182 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800183 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400184 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200185 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800186 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400187 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500188 "androidx.exifinterface_exifinterface",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800189 "com.google.android.material_material",
Steve Elliotta7d72052020-12-16 23:04:19 -0500190 "kotlinx_coroutines_android",
191 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800192 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400193 "SystemUI-tags",
194 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000195 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400196 "dagger2",
Brett Chabotfc8675a2023-03-27 10:33:10 -0700197 "jsr305",
Andy Wickham64e34102021-03-07 16:02:01 -0800198 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400199 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400200 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000201 "motion_tool_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400202 ],
203 manifest: "AndroidManifest.xml",
204
Kevin Jeonf2e72182022-04-04 19:05:05 +0000205 javacflags: ["-Adagger.fastInit=enabled"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700206 kotlincflags: ["-Xjvm-default=enable"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500207
Dave Mankoffdffcc472020-07-08 15:25:16 -0400208 plugins: ["dagger2-compiler"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000209
210 lint: {
211 extra_check_modules: ["SystemUILintChecker"],
212 },
Jason Monka2f2d822018-08-13 11:10:48 -0400213}
214
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900215filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500216 name: "AAA-src",
217 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
218 path: "tests/src",
219}
220
221filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900222 name: "SystemUI-tests-utils",
223 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200224 "tests/utils/src/**/*.java",
225 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400226 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200227 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900228}
229
Kevin Liud3793232023-02-09 20:37:27 +0000230filegroup {
231 name: "SystemUI-tests-robolectric-pilots",
232 srcs: [
Kevin Liuc54db8b2023-03-22 21:41:46 +0000233 /* Keyguard converted tests */
Kevin Liud3793232023-02-09 20:37:27 +0000234 // data
235 "tests/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfigTest.kt",
236 "tests/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfigTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000237 "tests/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfigTest.kt",
238 "tests/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfigTest.kt",
239 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLegacySettingSyncerTest.kt",
240 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt",
241 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceRemoteUserSelectionManagerTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000242 "tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfigTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000243 "tests/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfigTest.kt",
244 "tests/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfigTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000245 "tests/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfigTest.kt",
246 "tests/src/com/android/systemui/keyguard/data/repository/BiometricSettingsRepositoryTest.kt",
247 "tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt",
248 "tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFingerprintAuthRepositoryTest.kt",
249 "tests/src/com/android/systemui/keyguard/data/repository/DevicePostureRepositoryTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000250 "tests/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepositoryTest.kt",
251 "tests/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryImplTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000252 "tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt",
253 "tests/src/com/android/systemui/keyguard/data/repository/TrustRepositoryTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000254 // domain
Aaron Liu8456c412023-05-31 11:12:55 -0700255 "tests/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractorTest.kt",
256 "tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerCallbackInteractorTest.kt",
257 "tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorWithCoroutinesTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000258 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt",
Kevin Liu810fcbb2023-04-24 22:33:07 +0000259 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000260 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractorTest.kt",
261 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt",
262 "tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000263 // ui
Aaron Liu8456c412023-05-31 11:12:55 -0700264 "tests/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModelTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000265 "tests/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToLockscreenTransitionViewModelTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000266 "tests/src/com/android/systemui/keyguard/ui/viewmodel/GoneToDreamingTransitionViewModelTest.kt",
267 "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt",
268 "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt",
269 "tests/src/com/android/systemui/keyguard/ui/viewmodel/OccludedToLockscreenTransitionViewModelTest.kt",
Kevin Liu810fcbb2023-04-24 22:33:07 +0000270 "tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000271 // Keyguard helper
272 "tests/src/com/android/systemui/keyguard/data/quickaffordance/FakeKeyguardQuickAffordanceConfig.kt",
Brad Hinegardner5094a5d2023-04-25 16:28:45 -0400273 "tests/src/com/android/systemui/dock/DockManagerFake.java",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000274 "tests/src/com/android/systemui/dump/LogBufferHelper.kt",
275 "tests/src/com/android/systemui/statusbar/phone/FakeKeyguardStateController.java",
276 "tests/src/com/android/systemui/keyguard/domain/quickaffordance/FakeKeyguardQuickAffordanceRegistry.kt",
Kevin Liu092b8212023-02-15 05:42:34 +0000277
Kevin Liuc54db8b2023-03-22 21:41:46 +0000278 /* Biometric converted tests */
Kevin Liu092b8212023-02-15 05:42:34 +0000279 "tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt",
280 "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt",
281 "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt",
282 "tests/src/com/android/systemui/biometrics/AuthControllerTest.java",
283 "tests/src/com/android/systemui/biometrics/BiometricDisplayListenerTest.java",
284 "tests/src/com/android/systemui/biometrics/FaceHelpMessageDeferralTest.kt",
285 "tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt",
286 "tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt",
287 "tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java",
288 "tests/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapterTest.java",
289 "tests/src/com/android/systemui/biometrics/UdfpsDisplayModeTest.java",
Beverlyea7325c2023-05-03 13:49:09 +0000290 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java",
291 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java",
292 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt",
Kevin Liu092b8212023-02-15 05:42:34 +0000293 "tests/src/com/android/systemui/biometrics/UdfpsShellTest.kt",
294 "tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000295 ],
296 path: "tests/src",
297}
298
Bryce Leea5b08082021-10-06 11:34:56 -0700299java_library {
300 name: "SystemUI-tests-concurrency",
301 srcs: [
302 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
303 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200304 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
305 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700306 ],
307 jarjar_rules: ":jarjar-rules-shared",
308}
309
Jason Monkae7ced22018-08-22 16:56:58 -0400310android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000311 name: "SystemUI-tests-base",
Sunny Goyaleb18d392020-02-07 16:48:14 -0800312 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400313 resource_dirs: [
314 "tests/res",
Sunny Goyalb4a26012019-12-05 15:49:41 -0800315 "res-product",
Jason Monkae7ced22018-08-22 16:56:58 -0400316 "res-keyguard",
317 "res",
318 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400319 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700320 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200321 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400322 "SystemUIPluginLib",
323 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000324 "SystemUICustomizationLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700325 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400326 "SettingsLib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500327 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400328 "androidx.legacy_legacy-support-v4",
329 "androidx.recyclerview_recyclerview",
330 "androidx.preference_preference",
331 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500332 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400333 "androidx.mediarouter_mediarouter",
334 "androidx.palette_palette",
335 "androidx.legacy_legacy-preference-v14",
336 "androidx.leanback_leanback",
337 "androidx.slice_slice-core",
338 "androidx.slice_slice-view",
339 "androidx.slice_slice-builders",
340 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800341 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400342 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200343 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800344 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400345 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500346 "androidx.exifinterface_exifinterface",
Pinyao Tingee191b12020-04-29 18:35:39 -0700347 "kotlinx-coroutines-android",
348 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700349 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000350 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700351 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400352 "SystemUI-tags",
353 "SystemUI-proto",
354 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900355 "hamcrest-library",
356 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400357 "testables",
358 "truth-prebuilt",
Lucas Dupine37369f2021-08-31 00:19:39 +0000359 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400360 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800361 "jsr330",
362 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400363 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000364 "motion_tool_lib",
Johannes Gallmannb642af92022-10-14 09:58:09 +0000365 "androidx.core_core-animation-testing-nodeps",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100366 "androidx.compose.ui_ui",
Jason Monkae7ced22018-08-22 16:56:58 -0400367 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000368}
369
370android_library {
371 name: "SystemUI-tests",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100372 defaults: [
373 "SystemUI_compose_defaults",
374 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000375 manifest: "tests/AndroidManifest-base.xml",
376 additional_manifests: ["tests/AndroidManifest.xml"],
377 srcs: [
378 "tests/src/**/*.kt",
379 "tests/src/**/*.java",
380 "src/**/*.kt",
381 "src/**/*.java",
382 "src/**/I*.aidl",
383 ":ReleaseJavaFiles",
384 ":SystemUI-tests-utils",
385 ],
386 static_libs: [
387 "SystemUI-tests-base",
388 "androidx.test.uiautomator_uiautomator",
389 "mockito-target-extended-minus-junit4",
390 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000391 "androidx.test.ext.truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000392 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400393 libs: [
394 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400395 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200396 "android.test.mock",
Jason Monkae7ced22018-08-22 16:56:58 -0400397 ],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700398 kotlincflags: ["-Xjvm-default=enable"],
Jason Monkae7ced22018-08-22 16:56:58 -0400399 aaptflags: [
400 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700401 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400402 ],
Dave Mankoffdffcc472020-07-08 15:25:16 -0400403 plugins: ["dagger2-compiler"],
Cole Faust17f1e722022-08-16 15:30:26 -0700404 lint: {
405 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700406 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700407 },
Jason Monkae7ced22018-08-22 16:56:58 -0400408}
409
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000410android_app {
411 name: "SystemUIRobo-stub",
412 defaults: [
413 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800414 "SystemUI_optimized_defaults",
Kevin Liud3793232023-02-09 20:37:27 +0000415 "SystemUI_compose_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000416 ],
417 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000418
419 srcs: [
420 "src/**/*.kt",
421 "src/**/*.java",
422 "src/**/I*.aidl",
423 ":ReleaseJavaFiles",
424 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000425 static_libs: [
426 "SystemUI-tests-base",
427 ],
428 aaptflags: [
429 "--extra-packages",
430 "com.android.systemui",
431 ],
432 dont_merge_manifests: true,
433 platform_apis: true,
434 system_ext_specific: true,
435 certificate: "platform",
436 privileged: true,
437 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000438 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000439 optimize: {
440 shrink_resources: false,
441 proguard_flags_files: ["proguard.flags"],
442 },
Kevin Liud3793232023-02-09 20:37:27 +0000443
444 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000445}
446
447android_robolectric_test {
448 name: "SystemUiRoboTests",
449 srcs: [
450 "tests/robolectric/src/**/*.kt",
451 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000452 ":SystemUI-tests-utils",
453 ":SystemUI-tests-robolectric-pilots",
454 ],
455 static_libs: [
456 "androidx.test.uiautomator_uiautomator",
457 "androidx.test.ext.junit",
458 "inline-mockito-robolectric-prebuilt",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000459 ],
460 libs: [
461 "android.test.runner",
462 "android.test.base",
463 "android.test.mock",
464 "truth-prebuilt",
465 ],
Kevin Liud3793232023-02-09 20:37:27 +0000466
467 upstream: true,
468
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000469 instrumentation_for: "SystemUIRobo-stub",
470 java_resource_dirs: ["tests/robolectric/config"],
471}
472
Jared Duke84e94b32022-08-05 13:46:38 -0700473// Opt-out config for optimizing the SystemUI target using R8.
474// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
475// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800476soong_config_module_type {
477 name: "systemui_optimized_java_defaults",
478 module_type: "java_defaults",
479 config_namespace: "ANDROID",
480 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
481 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700482}
483
Jared Duke9dfa77b2021-12-22 13:31:06 -0800484systemui_optimized_java_defaults {
Jared Duke5bf6fb32023-02-23 14:27:47 -0800485 name: "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700486 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800487 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700488 optimize: {
489 enabled: true,
490 optimize: true,
491 shrink: true,
Jared Duke0668af22023-02-23 14:43:31 -0800492 shrink_resources: true,
Jared Dukef0904172022-06-07 18:01:06 +0000493 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700494 },
495 conditions_default: {
496 optimize: {
Jared Dukef0904172022-06-07 18:01:06 +0000497 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700498 },
499 },
500 },
501 },
502}
503
Jason Monka2f2d822018-08-13 11:10:48 -0400504android_app {
505 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700506 defaults: [
507 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800508 "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700509 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400510 static_libs: [
511 "SystemUI-core",
512 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000513 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400514
515 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900516 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400517 certificate: "platform",
518 privileged: true,
519
Selim Cinek820ba2d2019-06-18 18:59:09 -0700520 kotlincflags: ["-Xjvm-default=enable"],
521
Jason Monka2f2d822018-08-13 11:10:48 -0400522 dxflags: ["--multi-dex"],
Jared Duke5bf6fb32023-02-23 14:27:47 -0800523 optimize: {
524 proguard_flags_files: ["proguard.flags"],
525 },
Winson Chungb754f522020-08-03 22:17:08 -0700526 required: [
527 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700528 "wmshell.protolog.json.gz",
Winson Chungb754f522020-08-03 22:17:08 -0700529 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400530}