blob: dd93df833a3023479f7c2df8a37642bc97a9231b [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
Dave Mankofff6a791e2023-07-31 18:03:34 +0000135aconfig_declarations {
136 name: "systemui_aconfig_flags",
137 package: "com.android.systemui.aconfig",
Riley Jones32c5a682023-08-03 20:08:16 +0000138 srcs: [
139 "src/com/android/systemui/aconfig/systemui.aconfig",
140 "src/com/android/systemui/accessibility/aconfig/accessibility.aconfig",
141 ],
Dave Mankofff6a791e2023-07-31 18:03:34 +0000142}
143
144java_aconfig_library {
145 name: "systemui_aconfig_flags_lib",
146 aconfig_declarations: "systemui_aconfig_flags",
147}
148
Jason Monka2f2d822018-08-13 11:10:48 -0400149android_library {
150 name: "SystemUI-core",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100151 defaults: [
152 "SystemUI_compose_defaults",
153 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400154 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -0400155 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -0400156 "src/**/*.java",
157 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -0400158 ":ReleaseJavaFiles",
Jason Monka2f2d822018-08-13 11:10:48 -0400159 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400160 product_variables: {
161 debuggable: {
162 srcs: [":DebugJavaFiles"],
163 exclude_srcs: [":ReleaseJavaFiles"],
164 },
165 },
Jason Monka2f2d822018-08-13 11:10:48 -0400166 resource_dirs: [
Sunny Goyalb4a26012019-12-05 15:49:41 -0800167 "res-product",
Jason Monka2f2d822018-08-13 11:10:48 -0400168 "res-keyguard",
169 "res",
170 ],
Colin Crossc23cde42023-06-21 11:22:11 -0700171 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400172 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700173 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800174 "WindowManager-Shell",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200175 "SystemUIAnimationLib",
Darrell Shi60006322023-04-06 17:58:40 +0000176 "SystemUICommon",
177 "SystemUICustomizationLib",
Darrell Shi1a21b362023-04-28 19:51:44 +0000178 "SystemUILogLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400179 "SystemUIPluginLib",
180 "SystemUISharedLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800181 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400182 "SettingsLib",
Dave Mankofff6a791e2023-07-31 18:03:34 +0000183 "systemui_aconfig_flags_lib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700184 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500185 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400186 "androidx.legacy_legacy-support-v4",
187 "androidx.recyclerview_recyclerview",
188 "androidx.preference_preference",
189 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500190 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400191 "androidx.mediarouter_mediarouter",
192 "androidx.palette_palette",
193 "androidx.legacy_legacy-preference-v14",
194 "androidx.leanback_leanback",
195 "androidx.slice_slice-core",
196 "androidx.slice_slice-view",
197 "androidx.slice_slice-builders",
198 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800199 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400200 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200201 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800202 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400203 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500204 "androidx.exifinterface_exifinterface",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800205 "com.google.android.material_material",
Steve Elliotta7d72052020-12-16 23:04:19 -0500206 "kotlinx_coroutines_android",
207 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800208 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400209 "SystemUI-tags",
210 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000211 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700212 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400213 "dagger2",
Brett Chabotfc8675a2023-03-27 10:33:10 -0700214 "jsr305",
Andy Wickham64e34102021-03-07 16:02:01 -0800215 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400216 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400217 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000218 "motion_tool_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400219 ],
220 manifest: "AndroidManifest.xml",
221
Kevin Jeonf2e72182022-04-04 19:05:05 +0000222 javacflags: ["-Adagger.fastInit=enabled"],
Colin Cross6954ea72023-07-18 10:52:21 -0700223 kotlincflags: ["-Xjvm-default=all"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500224
Dave Mankoffdffcc472020-07-08 15:25:16 -0400225 plugins: ["dagger2-compiler"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000226
227 lint: {
228 extra_check_modules: ["SystemUILintChecker"],
229 },
Jason Monka2f2d822018-08-13 11:10:48 -0400230}
231
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900232filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500233 name: "AAA-src",
234 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
235 path: "tests/src",
236}
237
238filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900239 name: "SystemUI-tests-utils",
240 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200241 "tests/utils/src/**/*.java",
242 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400243 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200244 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900245}
246
Kevin Liud3793232023-02-09 20:37:27 +0000247filegroup {
Caitlin Shkuratovd3777bd2023-07-18 21:39:33 +0000248 name: "SystemUI-test-fakes",
249 srcs: [
250 /* Status bar fakes */
251 "tests/src/com/android/systemui/statusbar/pipeline/airplane/data/repository/FakeAirplaneModeRepository.kt",
252 "tests/src/com/android/systemui/statusbar/pipeline/shared/data/repository/FakeConnectivityRepository.kt",
253 "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/FakeWifiRepository.kt",
Darrell Shi9ea21282023-08-30 23:57:12 +0000254
255 /* Log fakes */
256 "tests/src/com/android/systemui/log/core/FakeLogBuffer.kt",
Caitlin Shkuratovd3777bd2023-07-18 21:39:33 +0000257 ],
258 path: "tests/src",
259}
260
261filegroup {
Kevin Liud3793232023-02-09 20:37:27 +0000262 name: "SystemUI-tests-robolectric-pilots",
263 srcs: [
Kevin Liuc54db8b2023-03-22 21:41:46 +0000264 /* Keyguard converted tests */
Kevin Liud3793232023-02-09 20:37:27 +0000265 // data
266 "tests/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfigTest.kt",
267 "tests/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfigTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000268 "tests/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfigTest.kt",
269 "tests/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfigTest.kt",
270 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLegacySettingSyncerTest.kt",
271 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt",
272 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceRemoteUserSelectionManagerTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000273 "tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfigTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000274 "tests/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfigTest.kt",
275 "tests/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfigTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000276 "tests/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfigTest.kt",
277 "tests/src/com/android/systemui/keyguard/data/repository/BiometricSettingsRepositoryTest.kt",
278 "tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt",
279 "tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFingerprintAuthRepositoryTest.kt",
280 "tests/src/com/android/systemui/keyguard/data/repository/DevicePostureRepositoryTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000281 "tests/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepositoryTest.kt",
282 "tests/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryImplTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000283 "tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt",
284 "tests/src/com/android/systemui/keyguard/data/repository/TrustRepositoryTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000285 // domain
Aaron Liu8456c412023-05-31 11:12:55 -0700286 "tests/src/com/android/systemui/bouncer/domain/interactor/AlternateBouncerInteractorTest.kt",
287 "tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerCallbackInteractorTest.kt",
288 "tests/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractorWithCoroutinesTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000289 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt",
Kevin Liu810fcbb2023-04-24 22:33:07 +0000290 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000291 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractorTest.kt",
292 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt",
293 "tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000294 // ui
Aaron Liu8456c412023-05-31 11:12:55 -0700295 "tests/src/com/android/systemui/bouncer/ui/viewmodel/KeyguardBouncerViewModelTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000296 "tests/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToLockscreenTransitionViewModelTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000297 "tests/src/com/android/systemui/keyguard/ui/viewmodel/GoneToDreamingTransitionViewModelTest.kt",
298 "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt",
299 "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt",
300 "tests/src/com/android/systemui/keyguard/ui/viewmodel/OccludedToLockscreenTransitionViewModelTest.kt",
Kevin Liu810fcbb2023-04-24 22:33:07 +0000301 "tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000302 // Keyguard helper
303 "tests/src/com/android/systemui/keyguard/data/quickaffordance/FakeKeyguardQuickAffordanceConfig.kt",
Brad Hinegardner5094a5d2023-04-25 16:28:45 -0400304 "tests/src/com/android/systemui/dock/DockManagerFake.java",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000305 "tests/src/com/android/systemui/dump/LogBufferHelper.kt",
306 "tests/src/com/android/systemui/statusbar/phone/FakeKeyguardStateController.java",
Kevin Liu092b8212023-02-15 05:42:34 +0000307
Kevin Liuc54db8b2023-03-22 21:41:46 +0000308 /* Biometric converted tests */
Kevin Liu092b8212023-02-15 05:42:34 +0000309 "tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt",
310 "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt",
311 "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt",
312 "tests/src/com/android/systemui/biometrics/AuthControllerTest.java",
313 "tests/src/com/android/systemui/biometrics/BiometricDisplayListenerTest.java",
314 "tests/src/com/android/systemui/biometrics/FaceHelpMessageDeferralTest.kt",
315 "tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt",
316 "tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt",
317 "tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java",
318 "tests/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapterTest.java",
319 "tests/src/com/android/systemui/biometrics/UdfpsDisplayModeTest.java",
Beverlyea7325c2023-05-03 13:49:09 +0000320 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java",
321 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java",
322 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt",
Kevin Liu092b8212023-02-15 05:42:34 +0000323 "tests/src/com/android/systemui/biometrics/UdfpsShellTest.kt",
324 "tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt",
Caitlin Shkuratovd3777bd2023-07-18 21:39:33 +0000325
326 /* Status bar wifi converted tests */
327 "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/WifiRepositorySwitcherTest.kt",
328 "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/DisabledWifiRepositoryTest.kt",
329 "tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt",
Caitlin Shkuratove0ed29452023-07-20 13:26:29 +0000330 "tests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt",
Caitlin Shkuratov87d86642023-07-20 14:49:28 +0000331 "tests/src/com/android/systemui/statusbar/pipeline/wifi/ui/viewmodel/WifiViewModelTest.kt",
Aaron Liu95f9e9a2023-08-25 11:56:47 -0700332
333 /* Bouncer UI tests */
334 "tests/src/com/android/keyguard/KeyguardPasswordViewControllerTest.kt",
335 "tests/src/com/android/keyguard/KeyguardPatternViewControllerTest.kt",
336 "tests/src/com/android/keyguard/KeyguardPinBasedInputViewControllerTest.java",
337 "tests/src/com/android/keyguard/KeyguardPinViewControllerTest.kt",
338 "tests/src/com/android/keyguard/KeyguardSecurityContainerTest.java",
339 "tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt",
340 "tests/src/com/android/keyguard/KeyguardSecurityViewFlipperControllerTest.java",
341 "tests/src/com/android/keyguard/KeyguardSimPinViewControllerTest.kt",
342 "tests/src/com/android/keyguard/KeyguardSimPukViewControllerTest.kt",
Darrell Shi9ea21282023-08-30 23:57:12 +0000343
344 /* Communal tests */
345 "tests/src/com/android/systemui/communal/data/repository/CommunalWidgetRepositoryImplTest.kt",
346 "tests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt",
347 "tests/src/com/android/systemui/communal/ui/view/layout/blueprints/DefaultCommunalBlueprintTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000348 ],
349 path: "tests/src",
350}
351
Bryce Leea5b08082021-10-06 11:34:56 -0700352java_library {
353 name: "SystemUI-tests-concurrency",
354 srcs: [
355 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
356 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200357 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
358 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700359 ],
360 jarjar_rules: ":jarjar-rules-shared",
361}
362
Jason Monkae7ced22018-08-22 16:56:58 -0400363android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000364 name: "SystemUI-tests-base",
Sunny Goyaleb18d392020-02-07 16:48:14 -0800365 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400366 resource_dirs: [
367 "tests/res",
Sunny Goyalb4a26012019-12-05 15:49:41 -0800368 "res-product",
Jason Monkae7ced22018-08-22 16:56:58 -0400369 "res-keyguard",
370 "res",
371 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400372 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700373 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200374 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400375 "SystemUIPluginLib",
376 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000377 "SystemUICustomizationLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700378 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400379 "SettingsLib",
Dave Mankofff6a791e2023-07-31 18:03:34 +0000380 "systemui_aconfig_flags_lib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500381 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400382 "androidx.legacy_legacy-support-v4",
383 "androidx.recyclerview_recyclerview",
384 "androidx.preference_preference",
385 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500386 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400387 "androidx.mediarouter_mediarouter",
388 "androidx.palette_palette",
389 "androidx.legacy_legacy-preference-v14",
390 "androidx.leanback_leanback",
391 "androidx.slice_slice-core",
392 "androidx.slice_slice-view",
393 "androidx.slice_slice-builders",
394 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800395 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400396 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200397 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800398 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400399 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500400 "androidx.exifinterface_exifinterface",
Pinyao Tingee191b12020-04-29 18:35:39 -0700401 "kotlinx-coroutines-android",
402 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700403 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000404 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700405 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400406 "SystemUI-tags",
407 "SystemUI-proto",
408 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900409 "hamcrest-library",
410 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400411 "testables",
412 "truth-prebuilt",
Lucas Dupine37369f2021-08-31 00:19:39 +0000413 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700414 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400415 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800416 "jsr330",
417 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400418 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000419 "motion_tool_lib",
Johannes Gallmannb642af92022-10-14 09:58:09 +0000420 "androidx.core_core-animation-testing-nodeps",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100421 "androidx.compose.ui_ui",
Jason Monkae7ced22018-08-22 16:56:58 -0400422 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000423}
424
425android_library {
426 name: "SystemUI-tests",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100427 defaults: [
428 "SystemUI_compose_defaults",
429 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000430 manifest: "tests/AndroidManifest-base.xml",
431 additional_manifests: ["tests/AndroidManifest.xml"],
432 srcs: [
433 "tests/src/**/*.kt",
434 "tests/src/**/*.java",
435 "src/**/*.kt",
436 "src/**/*.java",
437 "src/**/I*.aidl",
438 ":ReleaseJavaFiles",
439 ":SystemUI-tests-utils",
440 ],
441 static_libs: [
442 "SystemUI-tests-base",
443 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400444 "androidx.core_core-animation-testing",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000445 "mockito-target-extended-minus-junit4",
446 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000447 "androidx.test.ext.truth",
Colin Cross852cd142023-08-11 16:53:55 -0700448 "kotlin-test",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000449 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400450 libs: [
451 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400452 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200453 "android.test.mock",
Jason Monkae7ced22018-08-22 16:56:58 -0400454 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700455 kotlincflags: ["-Xjvm-default=all"],
Jason Monkae7ced22018-08-22 16:56:58 -0400456 aaptflags: [
457 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700458 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400459 ],
Dave Mankoffdffcc472020-07-08 15:25:16 -0400460 plugins: ["dagger2-compiler"],
Cole Faust17f1e722022-08-16 15:30:26 -0700461 lint: {
462 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700463 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700464 },
Jason Monkae7ced22018-08-22 16:56:58 -0400465}
466
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000467android_app {
468 name: "SystemUIRobo-stub",
469 defaults: [
470 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800471 "SystemUI_optimized_defaults",
Kevin Liud3793232023-02-09 20:37:27 +0000472 "SystemUI_compose_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000473 ],
474 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000475
476 srcs: [
477 "src/**/*.kt",
478 "src/**/*.java",
479 "src/**/I*.aidl",
480 ":ReleaseJavaFiles",
481 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000482 static_libs: [
483 "SystemUI-tests-base",
484 ],
485 aaptflags: [
486 "--extra-packages",
487 "com.android.systemui",
488 ],
489 dont_merge_manifests: true,
490 platform_apis: true,
491 system_ext_specific: true,
492 certificate: "platform",
493 privileged: true,
494 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000495 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000496 optimize: {
497 shrink_resources: false,
498 proguard_flags_files: ["proguard.flags"],
499 },
Kevin Liud3793232023-02-09 20:37:27 +0000500
501 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000502}
503
504android_robolectric_test {
505 name: "SystemUiRoboTests",
506 srcs: [
507 "tests/robolectric/src/**/*.kt",
508 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000509 ":SystemUI-tests-utils",
Caitlin Shkuratovd3777bd2023-07-18 21:39:33 +0000510 ":SystemUI-test-fakes",
Kevin Liud3793232023-02-09 20:37:27 +0000511 ":SystemUI-tests-robolectric-pilots",
512 ],
513 static_libs: [
514 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400515 "androidx.core_core-animation-testing",
Kevin Liud3793232023-02-09 20:37:27 +0000516 "androidx.test.ext.junit",
517 "inline-mockito-robolectric-prebuilt",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000518 ],
519 libs: [
520 "android.test.runner",
521 "android.test.base",
522 "android.test.mock",
523 "truth-prebuilt",
524 ],
Kevin Liud3793232023-02-09 20:37:27 +0000525
526 upstream: true,
527
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000528 instrumentation_for: "SystemUIRobo-stub",
529 java_resource_dirs: ["tests/robolectric/config"],
530}
531
Jared Duke84e94b32022-08-05 13:46:38 -0700532// Opt-out config for optimizing the SystemUI target using R8.
533// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
534// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800535soong_config_module_type {
536 name: "systemui_optimized_java_defaults",
537 module_type: "java_defaults",
538 config_namespace: "ANDROID",
539 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
540 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700541}
542
Jared Duke9dfa77b2021-12-22 13:31:06 -0800543systemui_optimized_java_defaults {
Jared Duke5bf6fb32023-02-23 14:27:47 -0800544 name: "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700545 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800546 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700547 optimize: {
548 enabled: true,
549 optimize: true,
550 shrink: true,
Jared Duke0668af22023-02-23 14:43:31 -0800551 shrink_resources: true,
Jared Dukef0904172022-06-07 18:01:06 +0000552 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700553 },
554 conditions_default: {
555 optimize: {
Jared Dukef0904172022-06-07 18:01:06 +0000556 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700557 },
558 },
559 },
560 },
561}
562
Jason Monka2f2d822018-08-13 11:10:48 -0400563android_app {
564 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700565 defaults: [
566 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800567 "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700568 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400569 static_libs: [
570 "SystemUI-core",
571 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000572 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400573
Colin Crossc23cde42023-06-21 11:22:11 -0700574 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400575 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900576 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400577 certificate: "platform",
578 privileged: true,
579
Colin Cross6954ea72023-07-18 10:52:21 -0700580 kotlincflags: ["-Xjvm-default=all"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700581
Jason Monka2f2d822018-08-13 11:10:48 -0400582 dxflags: ["--multi-dex"],
Jared Duke5bf6fb32023-02-23 14:27:47 -0800583 optimize: {
584 proguard_flags_files: ["proguard.flags"],
585 },
Winson Chungb754f522020-08-03 22:17:08 -0700586 required: [
587 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700588 "wmshell.protolog.json.gz",
Winson Chungb754f522020-08-03 22:17:08 -0700589 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400590}