blob: 5d1e2c33f454646ef17c41ecd492612ba1216d58 [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",
Stefan Andonian2de9db72024-03-08 04:43:38 +0000158 "TraceurCommon",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000159 "motion_tool_lib",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100160 "notification_flags_lib",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100161 "PlatformComposeCore",
162 "PlatformComposeSceneTransitionLayout",
163 "androidx.compose.runtime_runtime",
164 "androidx.compose.material3_material3",
165 "androidx.compose.material_material-icons-extended",
166 "androidx.activity_activity-compose",
167 "androidx.compose.animation_animation-graphics",
Jason Monka2f2d822018-08-13 11:10:48 -0400168 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200169 libs: [
170 "keepanno-annotations",
171 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400172 manifest: "AndroidManifest.xml",
173
Coco Duand8ef1812023-10-19 21:35:01 +0000174 javacflags: [
175 "-Adagger.fastInit=enabled",
Dave Mankofff69c3422024-01-26 20:59:11 +0000176 "-Adagger.explicitBindingConflictsWithInject=ERROR",
177 "-Adagger.strictMultibindingValidation=enabled",
Coco Duand8ef1812023-10-19 21:35:01 +0000178 "-Aroom.schemaLocation=frameworks/base/packages/SystemUI/schemas",
179 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700180 kotlincflags: ["-Xjvm-default=all"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500181
Coco Duand8ef1812023-10-19 21:35:01 +0000182 plugins: [
183 "androidx.room_room-compiler-plugin",
184 "dagger2-compiler",
185 ],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000186
187 lint: {
188 extra_check_modules: ["SystemUILintChecker"],
Michal Brzezinskid552d1f2023-09-29 15:00:19 +0100189 warning_checks: ["MissingApacheLicenseDetector"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000190 },
Zi Wange8d2a302024-02-26 18:24:35 -0800191 skip_jarjar_repackage: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400192}
193
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900194filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500195 name: "AAA-src",
196 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
197 path: "tests/src",
198}
199
200filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900201 name: "SystemUI-tests-utils",
202 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200203 "tests/utils/src/**/*.java",
204 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400205 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200206 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900207}
208
Kevin Liud3793232023-02-09 20:37:27 +0000209filegroup {
David Saffb2319612023-10-19 14:14:16 -0400210 name: "SystemUI-tests-multivalent",
211 srcs: [
212 "multivalentTests/src/**/*.kt",
Rex Hoffman1477e0f2023-11-28 17:18:28 +0000213 "multivalentTests/src/**/*.java",
David Saffb2319612023-10-19 14:14:16 -0400214 ],
215 path: "multivalentTests/src",
216}
217
Bryce Leea5b08082021-10-06 11:34:56 -0700218java_library {
219 name: "SystemUI-tests-concurrency",
220 srcs: [
221 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
222 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200223 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
224 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700225 ],
226 jarjar_rules: ":jarjar-rules-shared",
227}
228
Jason Monkae7ced22018-08-22 16:56:58 -0400229android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000230 name: "SystemUI-tests-base",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700231 use_resource_processor: true,
Sunny Goyaleb18d392020-02-07 16:48:14 -0800232 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400233 resource_dirs: [
234 "tests/res",
Jason Monkae7ced22018-08-22 16:56:58 -0400235 ],
Luca Zuccarini23b4cb22024-02-20 16:55:21 +0000236 asset_dirs: [
237 "tests/goldens",
238 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400239 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700240 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700241 "WifiTrackerLib",
Luca Zuccarini674ecf02023-12-20 15:51:55 +0100242 "PlatformAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400243 "SystemUIPluginLib",
244 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000245 "SystemUICustomizationLib",
Ioana Alexandru7678de9e2023-12-04 21:07:23 +0100246 "SystemUICustomizationTestUtils",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700247 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400248 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400249 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000250 "com_android_systemui_shared_flags_lib",
Jeff DeCew91a53962023-10-06 15:40:23 +0000251 "flag-junit-base",
Jeff DeCewcaef3b32023-11-13 03:13:13 +0000252 "platform-parametric-runner-lib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500253 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400254 "androidx.legacy_legacy-support-v4",
255 "androidx.recyclerview_recyclerview",
256 "androidx.preference_preference",
257 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500258 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400259 "androidx.mediarouter_mediarouter",
260 "androidx.palette_palette",
261 "androidx.legacy_legacy-preference-v14",
262 "androidx.leanback_leanback",
263 "androidx.slice_slice-core",
264 "androidx.slice_slice-view",
265 "androidx.slice_slice-builders",
266 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800267 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400268 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200269 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800270 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400271 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500272 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000273 "androidx.room_room-runtime",
274 "androidx.room_room-ktx",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000275 "device_state_flags_lib",
Pinyao Tingee191b12020-04-29 18:35:39 -0700276 "kotlinx-coroutines-android",
277 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700278 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000279 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700280 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400281 "SystemUI-tags",
282 "SystemUI-proto",
283 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900284 "hamcrest-library",
285 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400286 "testables",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000287 "truth",
Lucas Dupine37369f2021-08-31 00:19:39 +0000288 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700289 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400290 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800291 "jsr330",
292 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400293 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000294 "motion_tool_lib",
Johannes Gallmannb642af92022-10-14 09:58:09 +0000295 "androidx.core_core-animation-testing-nodeps",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100296 "androidx.compose.ui_ui",
Riley Jones84156fc2023-09-06 22:27:37 +0000297 "flag-junit",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700298 "ravenwood-junit",
Riley Jones84156fc2023-09-06 22:27:37 +0000299 "platform-test-annotations",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100300 "notification_flags_lib",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100301 "PlatformComposeCore",
302 "PlatformComposeSceneTransitionLayout",
303 "androidx.compose.runtime_runtime",
304 "androidx.compose.material3_material3",
305 "androidx.compose.material_material-icons-extended",
306 "androidx.activity_activity-compose",
307 "androidx.compose.animation_animation-graphics",
Stefan Andonian2de9db72024-03-08 04:43:38 +0000308 "TraceurCommon",
Jason Monkae7ced22018-08-22 16:56:58 -0400309 ],
Zi Wang06361622024-03-06 11:08:30 -0800310 skip_jarjar_repackage: true,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000311}
312
313android_library {
314 name: "SystemUI-tests",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700315 use_resource_processor: true,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000316 manifest: "tests/AndroidManifest-base.xml",
Colin Cross164493b2024-03-05 13:32:44 -0800317 resource_dirs: [],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000318 additional_manifests: ["tests/AndroidManifest.xml"],
319 srcs: [
320 "tests/src/**/*.kt",
321 "tests/src/**/*.java",
322 "src/**/*.kt",
323 "src/**/*.java",
324 "src/**/I*.aidl",
325 ":ReleaseJavaFiles",
David Saffb2319612023-10-19 14:14:16 -0400326 ":SystemUI-tests-multivalent",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000327 ":SystemUI-tests-utils",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100328 "compose/features/src/**/*.kt",
329 "compose/facade/enabled/src/**/*.kt",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000330 ],
331 static_libs: [
332 "SystemUI-tests-base",
333 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400334 "androidx.core_core-animation-testing",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000335 "mockito-target-extended-minus-junit4",
Mark Renoufe03d1c62024-03-25 11:59:03 -0400336 "mockito-kotlin2",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000337 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000338 "androidx.test.ext.truth",
Colin Cross852cd142023-08-11 16:53:55 -0700339 "kotlin-test",
Luca Zuccarini23b4cb22024-02-20 16:55:21 +0000340 "platform-screenshot-diff-core",
341 "PlatformMotionTesting",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100342 "SystemUICustomizationTestUtils",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100343 "androidx.compose.runtime_runtime",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000344 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400345 libs: [
346 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400347 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200348 "android.test.mock",
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200349 "keepanno-annotations",
Jason Monkae7ced22018-08-22 16:56:58 -0400350 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700351 kotlincflags: ["-Xjvm-default=all"],
Jason Monkae7ced22018-08-22 16:56:58 -0400352 aaptflags: [
353 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700354 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400355 ],
Coco Duand8ef1812023-10-19 21:35:01 +0000356 plugins: [
357 "androidx.room_room-compiler-plugin",
358 "dagger2-compiler",
359 ],
Cole Faust17f1e722022-08-16 15:30:26 -0700360 lint: {
361 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700362 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700363 },
Zi Wang06361622024-03-06 11:08:30 -0800364 skip_jarjar_repackage: true,
Jason Monkae7ced22018-08-22 16:56:58 -0400365}
366
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000367android_app {
368 name: "SystemUIRobo-stub",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700369 // SystemUiRavenTests references the .aapt.srcjar
370 use_resource_processor: false,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000371 defaults: [
372 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800373 "SystemUI_optimized_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000374 ],
375 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000376
377 srcs: [
378 "src/**/*.kt",
379 "src/**/*.java",
380 "src/**/I*.aidl",
381 ":ReleaseJavaFiles",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100382 "compose/features/src/**/*.kt",
383 "compose/facade/enabled/src/**/*.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000384 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000385 static_libs: [
386 "SystemUI-tests-base",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100387 "androidx.compose.runtime_runtime",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000388 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200389 libs: [
390 "keepanno-annotations",
391 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000392 aaptflags: [
393 "--extra-packages",
394 "com.android.systemui",
395 ],
396 dont_merge_manifests: true,
397 platform_apis: true,
398 system_ext_specific: true,
399 certificate: "platform",
400 privileged: true,
401 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000402 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000403 optimize: {
404 shrink_resources: false,
405 proguard_flags_files: ["proguard.flags"],
406 },
Kevin Liud3793232023-02-09 20:37:27 +0000407
408 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000409}
410
411android_robolectric_test {
412 name: "SystemUiRoboTests",
413 srcs: [
414 "tests/robolectric/src/**/*.kt",
415 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000416 ":SystemUI-tests-utils",
David Saffb2319612023-10-19 14:14:16 -0400417 ":SystemUI-tests-multivalent",
Kevin Liud3793232023-02-09 20:37:27 +0000418 ],
419 static_libs: [
Beverly7c6fc662023-11-16 17:33:35 +0000420 "dagger2",
Kevin Liud3793232023-02-09 20:37:27 +0000421 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400422 "androidx.core_core-animation-testing",
Kevin Liud3793232023-02-09 20:37:27 +0000423 "androidx.test.ext.junit",
424 "inline-mockito-robolectric-prebuilt",
Jeff DeCew52c6a8b2023-12-21 19:21:03 +0000425 "platform-parametric-runner-lib",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100426 "SystemUICustomizationTestUtils",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000427 ],
428 libs: [
429 "android.test.runner",
430 "android.test.base",
431 "android.test.mock",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000432 "truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000433 ],
Kevin Liud3793232023-02-09 20:37:27 +0000434
435 upstream: true,
436
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000437 instrumentation_for: "SystemUIRobo-stub",
438 java_resource_dirs: ["tests/robolectric/config"],
Beverly56039f52023-11-13 21:56:33 +0000439 plugins: [
440 "dagger2-compiler",
441 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000442}
443
Jeff Sharkey0b319172024-01-25 10:58:48 -0700444android_ravenwood_test {
445 name: "SystemUiRavenTests",
446 srcs: [
447 ":SystemUI-tests-utils",
448 ":SystemUI-tests-multivalent",
449 // TODO(b/294256649): pivot to using {.aapt.jar} and re-enable
450 // use_resource_processor: true when better supported by soong
451 ":SystemUIRobo-stub{.aapt.srcjar}",
452 ],
453 static_libs: [
454 "SystemUI-core",
455 "SystemUI-res",
456 "SystemUI-tests-base",
457 "androidx.test.uiautomator_uiautomator",
458 "androidx.core_core-animation-testing",
459 "androidx.test.ext.junit",
460 ],
461 libs: [
462 "android.test.runner",
463 "android.test.base",
464 "android.test.mock",
465 ],
466 auto_gen_config: true,
467 plugins: [
468 "dagger2-compiler",
469 ],
470}
471
Jared Duke84e94b32022-08-05 13:46:38 -0700472// Opt-out config for optimizing the SystemUI target using R8.
473// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
474// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800475soong_config_module_type {
476 name: "systemui_optimized_java_defaults",
477 module_type: "java_defaults",
478 config_namespace: "ANDROID",
479 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
480 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700481}
482
Jared Duke9dfa77b2021-12-22 13:31:06 -0800483systemui_optimized_java_defaults {
Jared Duke5bf6fb32023-02-23 14:27:47 -0800484 name: "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700485 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800486 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700487 optimize: {
488 enabled: true,
489 optimize: true,
490 shrink: true,
Jared Duke0668af22023-02-23 14:43:31 -0800491 shrink_resources: true,
Jared Duke5ecfe872022-09-08 09:25:30 -0700492 ignore_warnings: false,
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 Duke5ecfe872022-09-08 09:25:30 -0700497 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000498 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700499 },
500 },
501 },
502 },
503}
504
Jason Monka2f2d822018-08-13 11:10:48 -0400505android_app {
506 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700507 defaults: [
508 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800509 "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700510 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400511 static_libs: [
512 "SystemUI-core",
513 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000514 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400515
Colin Crossc23cde42023-06-21 11:22:11 -0700516 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400517 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900518 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400519 certificate: "platform",
520 privileged: true,
521
Colin Cross6954ea72023-07-18 10:52:21 -0700522 kotlincflags: ["-Xjvm-default=all"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700523
Jason Monka2f2d822018-08-13 11:10:48 -0400524 dxflags: ["--multi-dex"],
Jared Duke5bf6fb32023-02-23 14:27:47 -0800525 optimize: {
526 proguard_flags_files: ["proguard.flags"],
527 },
Winson Chungb754f522020-08-03 22:17:08 -0700528 required: [
529 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700530 "wmshell.protolog.json.gz",
Pablo Gamito5fe2c802024-02-12 12:48:48 +0000531 "wmshell.protolog.pb",
Winson Chungb754f522020-08-03 22:17:08 -0700532 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400533}