blob: 9fcc47496ac290298f907a115acb85a571a90f71 [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 {
Aditya Choudharyb4262272024-01-31 11:09:29 +000018 default_team: "trendy_team_system_ui_please_use_a_more_specific_subteam_if_possible_",
Bob Badour8a6a2bc2021-02-12 17:07:05 -080019 default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
20}
21
22// Added automatically by a large-scale-change
23// See: http://go/android-license-faq
24license {
25 name: "frameworks_base_packages_SystemUI_license",
26 visibility: [":__subpackages__"],
27 license_kinds: [
28 "SPDX-license-identifier-Apache-2.0",
29 ],
30 license_text: [
31 "NOTICE",
32 ],
33}
34
Jason Monka2f2d822018-08-13 11:10:48 -040035java_library {
36 name: "SystemUI-proto",
37
38 srcs: ["src/**/*.proto"],
39
40 proto: {
41 type: "nano",
42 },
Winson Chungeb1aa3d2020-08-25 19:02:29 -070043
44 libs: [
45 "WindowManager-Shell-proto",
46 ],
Jason Monka2f2d822018-08-13 11:10:48 -040047}
48
49java_library {
50 name: "SystemUI-tags",
51 srcs: ["src/com/android/systemui/EventLogTags.logtags"],
52}
53
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040054filegroup {
55 name: "ReleaseJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -040056 srcs: [
57 "src-release/**/*.kt",
58 "src-release/**/*.java",
59 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040060}
61
62filegroup {
63 name: "DebugJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -040064 srcs: [
65 "src-debug/**/*.kt",
66 "src-debug/**/*.java",
67 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040068}
69
Xiaozhen Lin53063042022-11-23 02:18:08 +000070//Create a library to expose SystemUI's resources to other modules.
71android_library {
72 name: "SystemUI-res",
Peter Kalauskas84c5a992023-08-23 13:39:23 -070073 use_resource_processor: true,
Xiaozhen Lin53063042022-11-23 02:18:08 +000074 resource_dirs: [
75 "res-product",
76 "res-keyguard",
77 "res",
78 ],
79 static_libs: [
80 "SystemUISharedLib",
Hawkwood Glazier057df3a2023-06-14 20:10:21 +000081 "SystemUICustomizationLib",
Xiaozhen Lin53063042022-11-23 02:18:08 +000082 "SettingsLib",
83 "androidx.leanback_leanback",
84 "androidx.slice_slice-core",
85 "androidx.slice_slice-view",
86 ],
87 manifest: "AndroidManifest-res.xml",
88}
89
Jason Monka2f2d822018-08-13 11:10:48 -040090android_library {
91 name: "SystemUI-core",
92 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -040093 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -040094 "src/**/*.java",
95 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -040096 ":ReleaseJavaFiles",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +010097 "compose/features/src/**/*.kt",
98 "compose/facade/enabled/src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -040099 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400100 product_variables: {
101 debuggable: {
102 srcs: [":DebugJavaFiles"],
103 exclude_srcs: [":ReleaseJavaFiles"],
104 },
105 },
Colin Crossc23cde42023-06-21 11:22:11 -0700106 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400107 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700108 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700109 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800110 "WindowManager-Shell",
Luca Zuccarini674ecf02023-12-20 15:51:55 +0100111 "PlatformAnimationLib",
Darrell Shi60006322023-04-06 17:58:40 +0000112 "SystemUICommon",
113 "SystemUICustomizationLib",
Darrell Shi1a21b362023-04-28 19:51:44 +0000114 "SystemUILogLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400115 "SystemUIPluginLib",
116 "SystemUISharedLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800117 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400118 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400119 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000120 "com_android_systemui_shared_flags_lib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700121 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500122 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400123 "androidx.legacy_legacy-support-v4",
124 "androidx.recyclerview_recyclerview",
125 "androidx.preference_preference",
126 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500127 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400128 "androidx.mediarouter_mediarouter",
129 "androidx.palette_palette",
130 "androidx.legacy_legacy-preference-v14",
131 "androidx.leanback_leanback",
132 "androidx.slice_slice-core",
133 "androidx.slice_slice-view",
134 "androidx.slice_slice-builders",
135 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800136 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400137 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200138 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800139 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400140 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500141 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000142 "androidx.room_room-runtime",
143 "androidx.room_room-ktx",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800144 "com.google.android.material_material",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000145 "device_state_flags_lib",
Steve Elliotta7d72052020-12-16 23:04:19 -0500146 "kotlinx_coroutines_android",
147 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800148 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400149 "SystemUI-tags",
150 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000151 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700152 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400153 "dagger2",
Brett Chabotfc8675a2023-03-27 10:33:10 -0700154 "jsr305",
Andy Wickham64e34102021-03-07 16:02:01 -0800155 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400156 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400157 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000158 "motion_tool_lib",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100159 "notification_flags_lib",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100160 "PlatformComposeCore",
161 "PlatformComposeSceneTransitionLayout",
162 "androidx.compose.runtime_runtime",
163 "androidx.compose.material3_material3",
164 "androidx.compose.material_material-icons-extended",
165 "androidx.activity_activity-compose",
166 "androidx.compose.animation_animation-graphics",
Jason Monka2f2d822018-08-13 11:10:48 -0400167 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200168 libs: [
169 "keepanno-annotations",
170 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400171 manifest: "AndroidManifest.xml",
172
Coco Duand8ef1812023-10-19 21:35:01 +0000173 javacflags: [
174 "-Adagger.fastInit=enabled",
Dave Mankofff69c3422024-01-26 20:59:11 +0000175 "-Adagger.explicitBindingConflictsWithInject=ERROR",
176 "-Adagger.strictMultibindingValidation=enabled",
Coco Duand8ef1812023-10-19 21:35:01 +0000177 "-Aroom.schemaLocation=frameworks/base/packages/SystemUI/schemas",
178 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700179 kotlincflags: ["-Xjvm-default=all"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500180
Coco Duand8ef1812023-10-19 21:35:01 +0000181 plugins: [
182 "androidx.room_room-compiler-plugin",
183 "dagger2-compiler",
184 ],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000185
186 lint: {
187 extra_check_modules: ["SystemUILintChecker"],
Michal Brzezinskid552d1f2023-09-29 15:00:19 +0100188 warning_checks: ["MissingApacheLicenseDetector"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000189 },
Zi Wange8d2a302024-02-26 18:24:35 -0800190 skip_jarjar_repackage: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400191}
192
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900193filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500194 name: "AAA-src",
195 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
196 path: "tests/src",
197}
198
199filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900200 name: "SystemUI-tests-utils",
201 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200202 "tests/utils/src/**/*.java",
203 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400204 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200205 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900206}
207
Kevin Liud3793232023-02-09 20:37:27 +0000208filegroup {
David Saffb2319612023-10-19 14:14:16 -0400209 name: "SystemUI-tests-multivalent",
210 srcs: [
211 "multivalentTests/src/**/*.kt",
Rex Hoffman1477e0f2023-11-28 17:18:28 +0000212 "multivalentTests/src/**/*.java",
David Saffb2319612023-10-19 14:14:16 -0400213 ],
214 path: "multivalentTests/src",
215}
216
Bryce Leea5b08082021-10-06 11:34:56 -0700217java_library {
218 name: "SystemUI-tests-concurrency",
219 srcs: [
220 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
221 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200222 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
223 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700224 ],
225 jarjar_rules: ":jarjar-rules-shared",
226}
227
Jason Monkae7ced22018-08-22 16:56:58 -0400228android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000229 name: "SystemUI-tests-base",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700230 use_resource_processor: true,
Sunny Goyaleb18d392020-02-07 16:48:14 -0800231 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400232 resource_dirs: [
233 "tests/res",
Jason Monkae7ced22018-08-22 16:56:58 -0400234 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400235 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700236 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700237 "WifiTrackerLib",
Luca Zuccarini674ecf02023-12-20 15:51:55 +0100238 "PlatformAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400239 "SystemUIPluginLib",
240 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000241 "SystemUICustomizationLib",
Ioana Alexandru7678de9e2023-12-04 21:07:23 +0100242 "SystemUICustomizationTestUtils",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700243 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400244 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400245 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000246 "com_android_systemui_shared_flags_lib",
Jeff DeCew91a53962023-10-06 15:40:23 +0000247 "flag-junit-base",
Jeff DeCewcaef3b32023-11-13 03:13:13 +0000248 "platform-parametric-runner-lib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500249 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400250 "androidx.legacy_legacy-support-v4",
251 "androidx.recyclerview_recyclerview",
252 "androidx.preference_preference",
253 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500254 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400255 "androidx.mediarouter_mediarouter",
256 "androidx.palette_palette",
257 "androidx.legacy_legacy-preference-v14",
258 "androidx.leanback_leanback",
259 "androidx.slice_slice-core",
260 "androidx.slice_slice-view",
261 "androidx.slice_slice-builders",
262 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800263 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400264 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200265 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800266 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400267 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500268 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000269 "androidx.room_room-runtime",
270 "androidx.room_room-ktx",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000271 "device_state_flags_lib",
Pinyao Tingee191b12020-04-29 18:35:39 -0700272 "kotlinx-coroutines-android",
273 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700274 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000275 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700276 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400277 "SystemUI-tags",
278 "SystemUI-proto",
279 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900280 "hamcrest-library",
281 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400282 "testables",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000283 "truth",
Lucas Dupine37369f2021-08-31 00:19:39 +0000284 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700285 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400286 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800287 "jsr330",
288 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400289 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000290 "motion_tool_lib",
Johannes Gallmannb642af92022-10-14 09:58:09 +0000291 "androidx.core_core-animation-testing-nodeps",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100292 "androidx.compose.ui_ui",
Riley Jones84156fc2023-09-06 22:27:37 +0000293 "flag-junit",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700294 "ravenwood-junit",
Riley Jones84156fc2023-09-06 22:27:37 +0000295 "platform-test-annotations",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100296 "notification_flags_lib",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100297 "PlatformComposeCore",
298 "PlatformComposeSceneTransitionLayout",
299 "androidx.compose.runtime_runtime",
300 "androidx.compose.material3_material3",
301 "androidx.compose.material_material-icons-extended",
302 "androidx.activity_activity-compose",
303 "androidx.compose.animation_animation-graphics",
Jason Monkae7ced22018-08-22 16:56:58 -0400304 ],
Zi Wang06361622024-03-06 11:08:30 -0800305 skip_jarjar_repackage: true,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000306}
307
308android_library {
309 name: "SystemUI-tests",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700310 use_resource_processor: true,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000311 manifest: "tests/AndroidManifest-base.xml",
312 additional_manifests: ["tests/AndroidManifest.xml"],
313 srcs: [
314 "tests/src/**/*.kt",
315 "tests/src/**/*.java",
316 "src/**/*.kt",
317 "src/**/*.java",
318 "src/**/I*.aidl",
319 ":ReleaseJavaFiles",
David Saffb2319612023-10-19 14:14:16 -0400320 ":SystemUI-tests-multivalent",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000321 ":SystemUI-tests-utils",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100322 "compose/features/src/**/*.kt",
323 "compose/facade/enabled/src/**/*.kt",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000324 ],
325 static_libs: [
326 "SystemUI-tests-base",
327 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400328 "androidx.core_core-animation-testing",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000329 "mockito-target-extended-minus-junit4",
330 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000331 "androidx.test.ext.truth",
Colin Cross852cd142023-08-11 16:53:55 -0700332 "kotlin-test",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100333 "SystemUICustomizationTestUtils",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100334 "androidx.compose.runtime_runtime",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000335 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400336 libs: [
337 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400338 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200339 "android.test.mock",
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200340 "keepanno-annotations",
Jason Monkae7ced22018-08-22 16:56:58 -0400341 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700342 kotlincflags: ["-Xjvm-default=all"],
Jason Monkae7ced22018-08-22 16:56:58 -0400343 aaptflags: [
344 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700345 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400346 ],
Coco Duand8ef1812023-10-19 21:35:01 +0000347 plugins: [
348 "androidx.room_room-compiler-plugin",
349 "dagger2-compiler",
350 ],
Cole Faust17f1e722022-08-16 15:30:26 -0700351 lint: {
352 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700353 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700354 },
Zi Wang06361622024-03-06 11:08:30 -0800355 skip_jarjar_repackage: true,
Jason Monkae7ced22018-08-22 16:56:58 -0400356}
357
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000358android_app {
359 name: "SystemUIRobo-stub",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700360 // SystemUiRavenTests references the .aapt.srcjar
361 use_resource_processor: false,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000362 defaults: [
363 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800364 "SystemUI_optimized_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000365 ],
366 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000367
368 srcs: [
369 "src/**/*.kt",
370 "src/**/*.java",
371 "src/**/I*.aidl",
372 ":ReleaseJavaFiles",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100373 "compose/features/src/**/*.kt",
374 "compose/facade/enabled/src/**/*.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000375 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000376 static_libs: [
377 "SystemUI-tests-base",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100378 "androidx.compose.runtime_runtime",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000379 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200380 libs: [
381 "keepanno-annotations",
382 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000383 aaptflags: [
384 "--extra-packages",
385 "com.android.systemui",
386 ],
387 dont_merge_manifests: true,
388 platform_apis: true,
389 system_ext_specific: true,
390 certificate: "platform",
391 privileged: true,
392 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000393 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000394 optimize: {
395 shrink_resources: false,
396 proguard_flags_files: ["proguard.flags"],
397 },
Kevin Liud3793232023-02-09 20:37:27 +0000398
399 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000400}
401
402android_robolectric_test {
403 name: "SystemUiRoboTests",
404 srcs: [
405 "tests/robolectric/src/**/*.kt",
406 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000407 ":SystemUI-tests-utils",
David Saffb2319612023-10-19 14:14:16 -0400408 ":SystemUI-tests-multivalent",
Kevin Liud3793232023-02-09 20:37:27 +0000409 ],
410 static_libs: [
Beverly7c6fc662023-11-16 17:33:35 +0000411 "dagger2",
Kevin Liud3793232023-02-09 20:37:27 +0000412 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400413 "androidx.core_core-animation-testing",
Kevin Liud3793232023-02-09 20:37:27 +0000414 "androidx.test.ext.junit",
415 "inline-mockito-robolectric-prebuilt",
Jeff DeCew52c6a8b2023-12-21 19:21:03 +0000416 "platform-parametric-runner-lib",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100417 "SystemUICustomizationTestUtils",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000418 ],
419 libs: [
420 "android.test.runner",
421 "android.test.base",
422 "android.test.mock",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000423 "truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000424 ],
Kevin Liud3793232023-02-09 20:37:27 +0000425
426 upstream: true,
427
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000428 instrumentation_for: "SystemUIRobo-stub",
429 java_resource_dirs: ["tests/robolectric/config"],
Beverly56039f52023-11-13 21:56:33 +0000430 plugins: [
431 "dagger2-compiler",
432 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000433}
434
Jeff Sharkey0b319172024-01-25 10:58:48 -0700435android_ravenwood_test {
436 name: "SystemUiRavenTests",
437 srcs: [
438 ":SystemUI-tests-utils",
439 ":SystemUI-tests-multivalent",
440 // TODO(b/294256649): pivot to using {.aapt.jar} and re-enable
441 // use_resource_processor: true when better supported by soong
442 ":SystemUIRobo-stub{.aapt.srcjar}",
443 ],
444 static_libs: [
445 "SystemUI-core",
446 "SystemUI-res",
447 "SystemUI-tests-base",
448 "androidx.test.uiautomator_uiautomator",
449 "androidx.core_core-animation-testing",
450 "androidx.test.ext.junit",
451 ],
452 libs: [
453 "android.test.runner",
454 "android.test.base",
455 "android.test.mock",
456 ],
457 auto_gen_config: true,
458 plugins: [
459 "dagger2-compiler",
460 ],
461}
462
Jared Duke84e94b32022-08-05 13:46:38 -0700463// Opt-out config for optimizing the SystemUI target using R8.
464// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
465// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800466soong_config_module_type {
467 name: "systemui_optimized_java_defaults",
468 module_type: "java_defaults",
469 config_namespace: "ANDROID",
470 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
471 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700472}
473
Jared Duke9dfa77b2021-12-22 13:31:06 -0800474systemui_optimized_java_defaults {
Jared Duke5bf6fb32023-02-23 14:27:47 -0800475 name: "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700476 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800477 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700478 optimize: {
479 enabled: true,
480 optimize: true,
481 shrink: true,
Jared Duke0668af22023-02-23 14:43:31 -0800482 shrink_resources: true,
Jared Duke5ecfe872022-09-08 09:25:30 -0700483 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000484 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700485 },
486 conditions_default: {
487 optimize: {
Jared Duke5ecfe872022-09-08 09:25:30 -0700488 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000489 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700490 },
491 },
492 },
493 },
494}
495
Jason Monka2f2d822018-08-13 11:10:48 -0400496android_app {
497 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700498 defaults: [
499 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800500 "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700501 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400502 static_libs: [
503 "SystemUI-core",
504 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000505 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400506
Colin Crossc23cde42023-06-21 11:22:11 -0700507 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400508 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900509 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400510 certificate: "platform",
511 privileged: true,
512
Colin Cross6954ea72023-07-18 10:52:21 -0700513 kotlincflags: ["-Xjvm-default=all"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700514
Jason Monka2f2d822018-08-13 11:10:48 -0400515 dxflags: ["--multi-dex"],
Jared Duke5bf6fb32023-02-23 14:27:47 -0800516 optimize: {
517 proguard_flags_files: ["proguard.flags"],
518 },
Winson Chungb754f522020-08-03 22:17:08 -0700519 required: [
520 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700521 "wmshell.protolog.json.gz",
Pablo Gamito5fe2c802024-02-12 12:48:48 +0000522 "wmshell.protolog.pb",
Winson Chungb754f522020-08-03 22:17:08 -0700523 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400524}