blob: 7df3dfb89d965757c0444691ea147f7b0e4f65e8 [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 Demeulenaere68e91822022-12-16 10:55:47 +010068 ],
69
70 // By default, Compose is disabled and we compile the ComposeFacade
71 // in compose/facade/disabled/.
72 conditions_default: {
73 srcs: ["compose/facade/disabled/src/**/*.kt"],
74 static_libs: [],
75 },
76 },
77 },
78}
79
Jason Monka2f2d822018-08-13 11:10:48 -040080java_library {
81 name: "SystemUI-proto",
82
83 srcs: ["src/**/*.proto"],
84
85 proto: {
86 type: "nano",
87 },
Winson Chungeb1aa3d2020-08-25 19:02:29 -070088
89 libs: [
90 "WindowManager-Shell-proto",
91 ],
Jason Monka2f2d822018-08-13 11:10:48 -040092}
93
94java_library {
95 name: "SystemUI-tags",
96 srcs: ["src/com/android/systemui/EventLogTags.logtags"],
97}
98
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040099filegroup {
100 name: "ReleaseJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400101 srcs: [
102 "src-release/**/*.kt",
103 "src-release/**/*.java",
104 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400105}
106
107filegroup {
108 name: "DebugJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400109 srcs: [
110 "src-debug/**/*.kt",
111 "src-debug/**/*.java",
112 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400113}
114
Xiaozhen Lin53063042022-11-23 02:18:08 +0000115//Create a library to expose SystemUI's resources to other modules.
116android_library {
117 name: "SystemUI-res",
118 resource_dirs: [
119 "res-product",
120 "res-keyguard",
121 "res",
122 ],
123 static_libs: [
124 "SystemUISharedLib",
125 "SettingsLib",
126 "androidx.leanback_leanback",
127 "androidx.slice_slice-core",
128 "androidx.slice_slice-view",
129 ],
130 manifest: "AndroidManifest-res.xml",
131}
132
Jason Monka2f2d822018-08-13 11:10:48 -0400133android_library {
134 name: "SystemUI-core",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100135 defaults: [
136 "SystemUI_compose_defaults",
137 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400138 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -0400139 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -0400140 "src/**/*.java",
141 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -0400142 ":ReleaseJavaFiles",
Jason Monka2f2d822018-08-13 11:10:48 -0400143 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400144 product_variables: {
145 debuggable: {
146 srcs: [":DebugJavaFiles"],
147 exclude_srcs: [":ReleaseJavaFiles"],
148 },
149 },
Jason Monka2f2d822018-08-13 11:10:48 -0400150 resource_dirs: [
Sunny Goyalb4a26012019-12-05 15:49:41 -0800151 "res-product",
Jason Monka2f2d822018-08-13 11:10:48 -0400152 "res-keyguard",
153 "res",
154 ],
155 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700156 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800157 "WindowManager-Shell",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200158 "SystemUIAnimationLib",
Darrell Shi60006322023-04-06 17:58:40 +0000159 "SystemUICommon",
160 "SystemUICustomizationLib",
Darrell Shi1a21b362023-04-28 19:51:44 +0000161 "SystemUILogLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400162 "SystemUIPluginLib",
163 "SystemUISharedLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800164 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400165 "SettingsLib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700166 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500167 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400168 "androidx.legacy_legacy-support-v4",
169 "androidx.recyclerview_recyclerview",
170 "androidx.preference_preference",
171 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500172 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400173 "androidx.mediarouter_mediarouter",
174 "androidx.palette_palette",
175 "androidx.legacy_legacy-preference-v14",
176 "androidx.leanback_leanback",
177 "androidx.slice_slice-core",
178 "androidx.slice_slice-view",
179 "androidx.slice_slice-builders",
180 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800181 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400182 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200183 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800184 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400185 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500186 "androidx.exifinterface_exifinterface",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800187 "com.google.android.material_material",
Steve Elliotta7d72052020-12-16 23:04:19 -0500188 "kotlinx_coroutines_android",
189 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800190 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400191 "SystemUI-tags",
192 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000193 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400194 "dagger2",
Brett Chabotfc8675a2023-03-27 10:33:10 -0700195 "jsr305",
Andy Wickham64e34102021-03-07 16:02:01 -0800196 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400197 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400198 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000199 "motion_tool_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400200 ],
201 manifest: "AndroidManifest.xml",
202
Kevin Jeonf2e72182022-04-04 19:05:05 +0000203 javacflags: ["-Adagger.fastInit=enabled"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700204 kotlincflags: ["-Xjvm-default=enable"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500205
Dave Mankoffdffcc472020-07-08 15:25:16 -0400206 plugins: ["dagger2-compiler"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000207
208 lint: {
209 extra_check_modules: ["SystemUILintChecker"],
210 },
Jason Monka2f2d822018-08-13 11:10:48 -0400211}
212
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900213filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500214 name: "AAA-src",
215 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
216 path: "tests/src",
217}
218
219filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900220 name: "SystemUI-tests-utils",
221 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200222 "tests/utils/src/**/*.java",
223 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400224 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200225 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900226}
227
Kevin Liud3793232023-02-09 20:37:27 +0000228filegroup {
229 name: "SystemUI-tests-robolectric-pilots",
230 srcs: [
Kevin Liuc54db8b2023-03-22 21:41:46 +0000231 /* Keyguard converted tests */
Kevin Liud3793232023-02-09 20:37:27 +0000232 // data
233 "tests/src/com/android/systemui/keyguard/data/quickaffordance/CameraQuickAffordanceConfigTest.kt",
234 "tests/src/com/android/systemui/keyguard/data/quickaffordance/DoNotDisturbQuickAffordanceConfigTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000235 "tests/src/com/android/systemui/keyguard/data/quickaffordance/FlashlightQuickAffordanceConfigTest.kt",
236 "tests/src/com/android/systemui/keyguard/data/quickaffordance/HomeControlsKeyguardQuickAffordanceConfigTest.kt",
237 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLegacySettingSyncerTest.kt",
238 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceLocalUserSelectionManagerTest.kt",
239 "tests/src/com/android/systemui/keyguard/data/quickaffordance/KeyguardQuickAffordanceRemoteUserSelectionManagerTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000240 "tests/src/com/android/systemui/keyguard/data/quickaffordance/MuteQuickAffordanceConfigTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000241 "tests/src/com/android/systemui/keyguard/data/quickaffordance/QrCodeScannerKeyguardQuickAffordanceConfigTest.kt",
242 "tests/src/com/android/systemui/keyguard/data/quickaffordance/QuickAccessWalletKeyguardQuickAffordanceConfigTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000243 "tests/src/com/android/systemui/keyguard/data/quickaffordance/VideoCameraQuickAffordanceConfigTest.kt",
244 "tests/src/com/android/systemui/keyguard/data/repository/BiometricSettingsRepositoryTest.kt",
245 "tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFaceAuthRepositoryTest.kt",
246 "tests/src/com/android/systemui/keyguard/data/repository/DeviceEntryFingerprintAuthRepositoryTest.kt",
247 "tests/src/com/android/systemui/keyguard/data/repository/DevicePostureRepositoryTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000248 "tests/src/com/android/systemui/keyguard/data/repository/KeyguardQuickAffordanceRepositoryTest.kt",
249 "tests/src/com/android/systemui/keyguard/data/repository/KeyguardRepositoryImplTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000250 "tests/src/com/android/systemui/keyguard/data/repository/LightRevealScrimRepositoryTest.kt",
251 "tests/src/com/android/systemui/keyguard/data/repository/TrustRepositoryTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000252 // domain
253 "tests/src/com/android/systemui/keyguard/domain/interactor/AlternateBouncerInteractorTest.kt",
254 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt",
Kevin Liu810fcbb2023-04-24 22:33:07 +0000255 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardLongPressInteractorTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000256 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardQuickAffordanceInteractorTest.kt",
257 "tests/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorTest.kt",
258 "tests/src/com/android/systemui/keyguard/domain/interactor/LightRevealScrimInteractorTest.kt",
Kevin Liu810fcbb2023-04-24 22:33:07 +0000259 "tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerCallbackInteractorTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000260 "tests/src/com/android/systemui/keyguard/domain/interactor/PrimaryBouncerInteractorWithCoroutinesTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000261 // ui
262 "tests/src/com/android/systemui/keyguard/ui/viewmodel/DreamingToLockscreenTransitionViewModelTest.kt",
263 "tests/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardBouncerViewModelTest.kt",
264 "tests/src/com/android/systemui/keyguard/ui/viewmodel/GoneToDreamingTransitionViewModelTest.kt",
265 "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToDreamingTransitionViewModelTest.kt",
266 "tests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToOccludedTransitionViewModelTest.kt",
267 "tests/src/com/android/systemui/keyguard/ui/viewmodel/OccludedToLockscreenTransitionViewModelTest.kt",
Kevin Liu810fcbb2023-04-24 22:33:07 +0000268 "tests/src/com/android/systemui/keyguard/ui/viewmodel/PrimaryBouncerToGoneTransitionViewModelTest.kt",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000269 // Keyguard helper
270 "tests/src/com/android/systemui/keyguard/data/quickaffordance/FakeKeyguardQuickAffordanceConfig.kt",
Brad Hinegardner5094a5d2023-04-25 16:28:45 -0400271 "tests/src/com/android/systemui/dock/DockManagerFake.java",
Kevin Liuc54db8b2023-03-22 21:41:46 +0000272 "tests/src/com/android/systemui/dump/LogBufferHelper.kt",
273 "tests/src/com/android/systemui/statusbar/phone/FakeKeyguardStateController.java",
274 "tests/src/com/android/systemui/keyguard/domain/quickaffordance/FakeKeyguardQuickAffordanceRegistry.kt",
Kevin Liu092b8212023-02-15 05:42:34 +0000275
Kevin Liuc54db8b2023-03-22 21:41:46 +0000276 /* Biometric converted tests */
Kevin Liu092b8212023-02-15 05:42:34 +0000277 "tests/src/com/android/systemui/biometrics/BiometricTestExtensions.kt",
278 "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintAndFaceViewTest.kt",
279 "tests/src/com/android/systemui/biometrics/AuthBiometricFingerprintViewTest.kt",
280 "tests/src/com/android/systemui/biometrics/AuthControllerTest.java",
281 "tests/src/com/android/systemui/biometrics/BiometricDisplayListenerTest.java",
282 "tests/src/com/android/systemui/biometrics/FaceHelpMessageDeferralTest.kt",
283 "tests/src/com/android/systemui/biometrics/SideFpsControllerTest.kt",
284 "tests/src/com/android/systemui/biometrics/UdfpsControllerOverlayTest.kt",
285 "tests/src/com/android/systemui/biometrics/UdfpsControllerTest.java",
286 "tests/src/com/android/systemui/biometrics/UdfpsDialogMeasureAdapterTest.java",
287 "tests/src/com/android/systemui/biometrics/UdfpsDisplayModeTest.java",
Beverlyea7325c2023-05-03 13:49:09 +0000288 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerBaseTest.java",
289 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerTest.java",
290 "tests/src/com/android/systemui/biometrics/UdfpsKeyguardViewLegacyControllerWithCoroutinesTest.kt",
Kevin Liu092b8212023-02-15 05:42:34 +0000291 "tests/src/com/android/systemui/biometrics/UdfpsShellTest.kt",
292 "tests/src/com/android/systemui/biometrics/UdfpsViewTest.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000293 ],
294 path: "tests/src",
295}
296
Bryce Leea5b08082021-10-06 11:34:56 -0700297java_library {
298 name: "SystemUI-tests-concurrency",
299 srcs: [
300 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
301 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200302 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
303 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700304 ],
305 jarjar_rules: ":jarjar-rules-shared",
306}
307
Jason Monkae7ced22018-08-22 16:56:58 -0400308android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000309 name: "SystemUI-tests-base",
Sunny Goyaleb18d392020-02-07 16:48:14 -0800310 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400311 resource_dirs: [
312 "tests/res",
Sunny Goyalb4a26012019-12-05 15:49:41 -0800313 "res-product",
Jason Monkae7ced22018-08-22 16:56:58 -0400314 "res-keyguard",
315 "res",
316 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400317 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700318 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200319 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400320 "SystemUIPluginLib",
321 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000322 "SystemUICustomizationLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700323 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400324 "SettingsLib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500325 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400326 "androidx.legacy_legacy-support-v4",
327 "androidx.recyclerview_recyclerview",
328 "androidx.preference_preference",
329 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500330 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400331 "androidx.mediarouter_mediarouter",
332 "androidx.palette_palette",
333 "androidx.legacy_legacy-preference-v14",
334 "androidx.leanback_leanback",
335 "androidx.slice_slice-core",
336 "androidx.slice_slice-view",
337 "androidx.slice_slice-builders",
338 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800339 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400340 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200341 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800342 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400343 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500344 "androidx.exifinterface_exifinterface",
Pinyao Tingee191b12020-04-29 18:35:39 -0700345 "kotlinx-coroutines-android",
346 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700347 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000348 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700349 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400350 "SystemUI-tags",
351 "SystemUI-proto",
352 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900353 "hamcrest-library",
354 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400355 "testables",
356 "truth-prebuilt",
Lucas Dupine37369f2021-08-31 00:19:39 +0000357 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400358 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800359 "jsr330",
360 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400361 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000362 "motion_tool_lib",
Johannes Gallmannb642af92022-10-14 09:58:09 +0000363 "androidx.core_core-animation-testing-nodeps",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100364 "androidx.compose.ui_ui",
Jason Monkae7ced22018-08-22 16:56:58 -0400365 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000366}
367
368android_library {
369 name: "SystemUI-tests",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100370 defaults: [
371 "SystemUI_compose_defaults",
372 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000373 manifest: "tests/AndroidManifest-base.xml",
374 additional_manifests: ["tests/AndroidManifest.xml"],
375 srcs: [
376 "tests/src/**/*.kt",
377 "tests/src/**/*.java",
378 "src/**/*.kt",
379 "src/**/*.java",
380 "src/**/I*.aidl",
381 ":ReleaseJavaFiles",
382 ":SystemUI-tests-utils",
383 ],
384 static_libs: [
385 "SystemUI-tests-base",
386 "androidx.test.uiautomator_uiautomator",
387 "mockito-target-extended-minus-junit4",
388 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000389 "androidx.test.ext.truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000390 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400391 libs: [
392 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400393 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200394 "android.test.mock",
Jason Monkae7ced22018-08-22 16:56:58 -0400395 ],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700396 kotlincflags: ["-Xjvm-default=enable"],
Jason Monkae7ced22018-08-22 16:56:58 -0400397 aaptflags: [
398 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700399 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400400 ],
Dave Mankoffdffcc472020-07-08 15:25:16 -0400401 plugins: ["dagger2-compiler"],
Cole Faust17f1e722022-08-16 15:30:26 -0700402 lint: {
403 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700404 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700405 },
Jason Monkae7ced22018-08-22 16:56:58 -0400406}
407
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000408android_app {
409 name: "SystemUIRobo-stub",
410 defaults: [
411 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800412 "SystemUI_optimized_defaults",
Kevin Liud3793232023-02-09 20:37:27 +0000413 "SystemUI_compose_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000414 ],
415 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000416
417 srcs: [
418 "src/**/*.kt",
419 "src/**/*.java",
420 "src/**/I*.aidl",
421 ":ReleaseJavaFiles",
422 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000423 static_libs: [
424 "SystemUI-tests-base",
425 ],
426 aaptflags: [
427 "--extra-packages",
428 "com.android.systemui",
429 ],
430 dont_merge_manifests: true,
431 platform_apis: true,
432 system_ext_specific: true,
433 certificate: "platform",
434 privileged: true,
435 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000436 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000437 optimize: {
438 shrink_resources: false,
439 proguard_flags_files: ["proguard.flags"],
440 },
Kevin Liud3793232023-02-09 20:37:27 +0000441
442 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000443}
444
445android_robolectric_test {
446 name: "SystemUiRoboTests",
447 srcs: [
448 "tests/robolectric/src/**/*.kt",
449 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000450 ":SystemUI-tests-utils",
451 ":SystemUI-tests-robolectric-pilots",
452 ],
453 static_libs: [
454 "androidx.test.uiautomator_uiautomator",
455 "androidx.test.ext.junit",
456 "inline-mockito-robolectric-prebuilt",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000457 ],
458 libs: [
459 "android.test.runner",
460 "android.test.base",
461 "android.test.mock",
462 "truth-prebuilt",
463 ],
Kevin Liud3793232023-02-09 20:37:27 +0000464
465 upstream: true,
466
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000467 instrumentation_for: "SystemUIRobo-stub",
468 java_resource_dirs: ["tests/robolectric/config"],
469}
470
Jared Duke84e94b32022-08-05 13:46:38 -0700471// Opt-out config for optimizing the SystemUI target using R8.
472// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
473// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800474soong_config_module_type {
475 name: "systemui_optimized_java_defaults",
476 module_type: "java_defaults",
477 config_namespace: "ANDROID",
478 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
479 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700480}
481
Jared Duke9dfa77b2021-12-22 13:31:06 -0800482systemui_optimized_java_defaults {
Jared Duke5bf6fb32023-02-23 14:27:47 -0800483 name: "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700484 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800485 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700486 optimize: {
487 enabled: true,
488 optimize: true,
489 shrink: true,
Jared Duke0668af22023-02-23 14:43:31 -0800490 shrink_resources: true,
Jared Dukef0904172022-06-07 18:01:06 +0000491 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700492 },
493 conditions_default: {
494 optimize: {
Jared Dukef0904172022-06-07 18:01:06 +0000495 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700496 },
497 },
498 },
499 },
500}
501
Jason Monka2f2d822018-08-13 11:10:48 -0400502android_app {
503 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700504 defaults: [
505 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800506 "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700507 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400508 static_libs: [
509 "SystemUI-core",
510 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000511 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400512
513 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900514 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400515 certificate: "platform",
516 privileged: true,
517
Selim Cinek820ba2d2019-06-18 18:59:09 -0700518 kotlincflags: ["-Xjvm-default=enable"],
519
Jason Monka2f2d822018-08-13 11:10:48 -0400520 dxflags: ["--multi-dex"],
Jared Duke5bf6fb32023-02-23 14:27:47 -0800521 optimize: {
522 proguard_flags_files: ["proguard.flags"],
523 },
Winson Chungb754f522020-08-03 22:17:08 -0700524 required: [
525 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700526 "wmshell.protolog.json.gz",
Winson Chungb754f522020-08-03 22:17:08 -0700527 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400528}