blob: 40db52eec81b59a27adab22282c7de6633340663 [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 ],
Peter Kalauskascd50f532024-04-02 15:41:14 -070060 visibility: ["//visibility:private"],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040061}
62
63filegroup {
64 name: "DebugJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -040065 srcs: [
66 "src-debug/**/*.kt",
67 "src-debug/**/*.java",
68 ],
Peter Kalauskascd50f532024-04-02 15:41:14 -070069 visibility: ["//visibility:private"],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040070}
71
Xiaozhen Lin53063042022-11-23 02:18:08 +000072//Create a library to expose SystemUI's resources to other modules.
73android_library {
74 name: "SystemUI-res",
Peter Kalauskas84c5a992023-08-23 13:39:23 -070075 use_resource_processor: true,
Xiaozhen Lin53063042022-11-23 02:18:08 +000076 resource_dirs: [
77 "res-product",
78 "res-keyguard",
79 "res",
80 ],
81 static_libs: [
82 "SystemUISharedLib",
Hawkwood Glazier057df3a2023-06-14 20:10:21 +000083 "SystemUICustomizationLib",
Xiaozhen Lin53063042022-11-23 02:18:08 +000084 "SettingsLib",
85 "androidx.leanback_leanback",
86 "androidx.slice_slice-core",
87 "androidx.slice_slice-view",
88 ],
89 manifest: "AndroidManifest-res.xml",
90}
91
Jason Monka2f2d822018-08-13 11:10:48 -040092android_library {
93 name: "SystemUI-core",
94 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -040095 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -040096 "src/**/*.java",
97 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -040098 ":ReleaseJavaFiles",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +010099 "compose/features/src/**/*.kt",
100 "compose/facade/enabled/src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -0400101 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400102 product_variables: {
103 debuggable: {
104 srcs: [":DebugJavaFiles"],
105 exclude_srcs: [":ReleaseJavaFiles"],
106 },
107 },
Colin Crossc23cde42023-06-21 11:22:11 -0700108 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400109 static_libs: [
Peter Kalauskascd50f532024-04-02 15:41:14 -0700110 "//frameworks/libs/systemui:compilelib",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700111 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700112 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800113 "WindowManager-Shell",
Luca Zuccarini674ecf02023-12-20 15:51:55 +0100114 "PlatformAnimationLib",
Darrell Shi60006322023-04-06 17:58:40 +0000115 "SystemUICommon",
116 "SystemUICustomizationLib",
Darrell Shi1a21b362023-04-28 19:51:44 +0000117 "SystemUILogLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400118 "SystemUIPluginLib",
119 "SystemUISharedLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800120 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400121 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400122 "com_android_systemui_flags_lib",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700123 "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700124 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500125 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400126 "androidx.legacy_legacy-support-v4",
127 "androidx.recyclerview_recyclerview",
128 "androidx.preference_preference",
129 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500130 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400131 "androidx.mediarouter_mediarouter",
132 "androidx.palette_palette",
133 "androidx.legacy_legacy-preference-v14",
134 "androidx.leanback_leanback",
135 "androidx.slice_slice-core",
136 "androidx.slice_slice-view",
137 "androidx.slice_slice-builders",
138 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800139 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400140 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200141 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800142 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400143 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b922020-12-16 14:01:12 -0500144 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000145 "androidx.room_room-runtime",
146 "androidx.room_room-ktx",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800147 "com.google.android.material_material",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000148 "device_state_flags_lib",
Steve Elliotta7d72052020-12-16 23:04:19 -0500149 "kotlinx_coroutines_android",
150 "kotlinx_coroutines",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700151 "//frameworks/libs/systemui:iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400152 "SystemUI-tags",
153 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000154 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700155 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400156 "dagger2",
Brett Chabotfc8675a2023-03-27 10:33:10 -0700157 "jsr305",
Andy Wickham64e34102021-03-07 16:02:01 -0800158 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400159 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400160 "LowLightDreamLib",
Stefan Andonian2de9db72024-03-08 04:43:38 +0000161 "TraceurCommon",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700162 "//frameworks/libs/systemui:motion_tool_lib",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100163 "notification_flags_lib",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100164 "PlatformComposeCore",
165 "PlatformComposeSceneTransitionLayout",
166 "androidx.compose.runtime_runtime",
167 "androidx.compose.material3_material3",
168 "androidx.compose.material_material-icons-extended",
169 "androidx.activity_activity-compose",
170 "androidx.compose.animation_animation-graphics",
Jason Monka2f2d822018-08-13 11:10:48 -0400171 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200172 libs: [
173 "keepanno-annotations",
174 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400175 manifest: "AndroidManifest.xml",
176
Coco Duand8ef1812023-10-19 21:35:01 +0000177 javacflags: [
178 "-Adagger.fastInit=enabled",
Dave Mankofff69c3422024-01-26 20:59:11 +0000179 "-Adagger.explicitBindingConflictsWithInject=ERROR",
180 "-Adagger.strictMultibindingValidation=enabled",
Coco Duand8ef1812023-10-19 21:35:01 +0000181 "-Aroom.schemaLocation=frameworks/base/packages/SystemUI/schemas",
182 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700183 kotlincflags: ["-Xjvm-default=all"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500184
Coco Duand8ef1812023-10-19 21:35:01 +0000185 plugins: [
186 "androidx.room_room-compiler-plugin",
187 "dagger2-compiler",
188 ],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000189
190 lint: {
191 extra_check_modules: ["SystemUILintChecker"],
Michal Brzezinskid552d1f2023-09-29 15:00:19 +0100192 warning_checks: ["MissingApacheLicenseDetector"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000193 },
Jason Monka2f2d822018-08-13 11:10:48 -0400194}
195
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900196filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500197 name: "AAA-src",
198 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
199 path: "tests/src",
200}
201
202filegroup {
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400203 name: "kosmos-src",
204 srcs: ["tests/utils/kosmos/src/**/*.kt"],
205 path: "tests/utils/kosmos",
206}
207
208java_library {
209 name: "kosmos",
210 host_supported: true,
211 srcs: [":kosmos-src"],
212 static_libs: [
213 "kotlin-reflect",
214 "kotlin-stdlib",
215 ],
216}
217
218filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900219 name: "SystemUI-tests-utils",
220 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200221 "tests/utils/src/**/*.java",
222 "tests/utils/src/**/*.kt",
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400223 ":kosmos-src",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400224 ],
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400225 path: "tests/utils",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900226}
227
Kevin Liud3793232023-02-09 20:37:27 +0000228filegroup {
David Saffb2319612023-10-19 14:14:16 -0400229 name: "SystemUI-tests-multivalent",
230 srcs: [
231 "multivalentTests/src/**/*.kt",
Rex Hoffman1477e0f2023-11-28 17:18:28 +0000232 "multivalentTests/src/**/*.java",
David Saffb2319612023-10-19 14:14:16 -0400233 ],
234 path: "multivalentTests/src",
235}
236
Bryce Leea5b08082021-10-06 11:34:56 -0700237java_library {
238 name: "SystemUI-tests-concurrency",
239 srcs: [
240 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
241 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200242 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
243 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700244 ],
245 jarjar_rules: ":jarjar-rules-shared",
246}
247
Jason Monkae7ced22018-08-22 16:56:58 -0400248android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000249 name: "SystemUI-tests-base",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700250 use_resource_processor: true,
Sunny Goyaleb18d392020-02-07 16:48:14 -0800251 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400252 resource_dirs: [
253 "tests/res",
Jason Monkae7ced22018-08-22 16:56:58 -0400254 ],
Luca Zuccarini23b4cb22024-02-20 16:55:21 +0000255 asset_dirs: [
256 "tests/goldens",
257 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400258 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700259 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700260 "WifiTrackerLib",
Luca Zuccarini674ecf02023-12-20 15:51:55 +0100261 "PlatformAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400262 "SystemUIPluginLib",
263 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000264 "SystemUICustomizationLib",
Ioana Alexandru7678de9e2023-12-04 21:07:23 +0100265 "SystemUICustomizationTestUtils",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700266 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400267 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400268 "com_android_systemui_flags_lib",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700269 "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
Jeff DeCew91a53962023-10-06 15:40:23 +0000270 "flag-junit-base",
Jeff DeCewcaef3b32023-11-13 03:13:13 +0000271 "platform-parametric-runner-lib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500272 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400273 "androidx.legacy_legacy-support-v4",
274 "androidx.recyclerview_recyclerview",
275 "androidx.preference_preference",
276 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500277 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400278 "androidx.mediarouter_mediarouter",
279 "androidx.palette_palette",
280 "androidx.legacy_legacy-preference-v14",
281 "androidx.leanback_leanback",
282 "androidx.slice_slice-core",
283 "androidx.slice_slice-view",
284 "androidx.slice_slice-builders",
285 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800286 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400287 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200288 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800289 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400290 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b922020-12-16 14:01:12 -0500291 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000292 "androidx.room_room-runtime",
293 "androidx.room_room-ktx",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000294 "device_state_flags_lib",
Pinyao Tingee191b12020-04-29 18:35:39 -0700295 "kotlinx-coroutines-android",
296 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700297 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000298 "kotlin-reflect",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700299 "//frameworks/libs/systemui:iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400300 "SystemUI-tags",
301 "SystemUI-proto",
302 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900303 "hamcrest-library",
304 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400305 "testables",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000306 "truth",
Lucas Dupine37369f2021-08-31 00:19:39 +0000307 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700308 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400309 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800310 "jsr330",
311 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400312 "LowLightDreamLib",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700313 "//frameworks/libs/systemui:motion_tool_lib",
Colin Cross64ee6e22024-03-25 15:21:29 -0700314 "androidx.core_core-animation-testing",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100315 "androidx.compose.ui_ui",
Riley Jones84156fc2023-09-06 22:27:37 +0000316 "flag-junit",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700317 "ravenwood-junit",
Riley Jones84156fc2023-09-06 22:27:37 +0000318 "platform-test-annotations",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100319 "notification_flags_lib",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100320 "PlatformComposeCore",
321 "PlatformComposeSceneTransitionLayout",
322 "androidx.compose.runtime_runtime",
323 "androidx.compose.material3_material3",
324 "androidx.compose.material_material-icons-extended",
325 "androidx.activity_activity-compose",
326 "androidx.compose.animation_animation-graphics",
Stefan Andonian2de9db72024-03-08 04:43:38 +0000327 "TraceurCommon",
Jason Monkae7ced22018-08-22 16:56:58 -0400328 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000329}
330
331android_library {
332 name: "SystemUI-tests",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700333 use_resource_processor: true,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000334 manifest: "tests/AndroidManifest-base.xml",
Colin Cross164493b2024-03-05 13:32:44 -0800335 resource_dirs: [],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000336 additional_manifests: ["tests/AndroidManifest.xml"],
337 srcs: [
338 "tests/src/**/*.kt",
339 "tests/src/**/*.java",
340 "src/**/*.kt",
341 "src/**/*.java",
342 "src/**/I*.aidl",
343 ":ReleaseJavaFiles",
David Saffb2319612023-10-19 14:14:16 -0400344 ":SystemUI-tests-multivalent",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000345 ":SystemUI-tests-utils",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100346 "compose/features/src/**/*.kt",
347 "compose/facade/enabled/src/**/*.kt",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000348 ],
349 static_libs: [
Peter Kalauskascd50f532024-04-02 15:41:14 -0700350 "//frameworks/libs/systemui:compilelib",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000351 "SystemUI-tests-base",
352 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400353 "androidx.core_core-animation-testing",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000354 "mockito-target-extended-minus-junit4",
Mark Renoufe03d1c62024-03-25 11:59:03 -0400355 "mockito-kotlin2",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000356 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000357 "androidx.test.ext.truth",
Colin Cross852cd142023-08-11 16:53:55 -0700358 "kotlin-test",
Luca Zuccarini23b4cb22024-02-20 16:55:21 +0000359 "platform-screenshot-diff-core",
360 "PlatformMotionTesting",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100361 "SystemUICustomizationTestUtils",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100362 "androidx.compose.runtime_runtime",
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400363 "kosmos",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000364 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400365 libs: [
366 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400367 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200368 "android.test.mock",
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200369 "keepanno-annotations",
Jason Monkae7ced22018-08-22 16:56:58 -0400370 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700371 kotlincflags: ["-Xjvm-default=all"],
Jason Monkae7ced22018-08-22 16:56:58 -0400372 aaptflags: [
373 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700374 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400375 ],
Coco Duand8ef1812023-10-19 21:35:01 +0000376 plugins: [
377 "androidx.room_room-compiler-plugin",
378 "dagger2-compiler",
379 ],
Cole Faust17f1e722022-08-16 15:30:26 -0700380 lint: {
381 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700382 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700383 },
Jason Monkae7ced22018-08-22 16:56:58 -0400384}
385
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000386android_app {
387 name: "SystemUIRobo-stub",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700388 // SystemUiRavenTests references the .aapt.srcjar
389 use_resource_processor: false,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000390 defaults: [
391 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800392 "SystemUI_optimized_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000393 ],
394 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000395
396 srcs: [
397 "src/**/*.kt",
398 "src/**/*.java",
399 "src/**/I*.aidl",
400 ":ReleaseJavaFiles",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100401 "compose/features/src/**/*.kt",
402 "compose/facade/enabled/src/**/*.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000403 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000404 static_libs: [
Peter Kalauskascd50f532024-04-02 15:41:14 -0700405 "//frameworks/libs/systemui:compilelib",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000406 "SystemUI-tests-base",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100407 "androidx.compose.runtime_runtime",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000408 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200409 libs: [
410 "keepanno-annotations",
411 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000412 aaptflags: [
413 "--extra-packages",
414 "com.android.systemui",
415 ],
416 dont_merge_manifests: true,
417 platform_apis: true,
418 system_ext_specific: true,
419 certificate: "platform",
420 privileged: true,
421 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000422 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000423 optimize: {
424 shrink_resources: false,
425 proguard_flags_files: ["proguard.flags"],
426 },
Kevin Liud3793232023-02-09 20:37:27 +0000427
428 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000429}
430
431android_robolectric_test {
432 name: "SystemUiRoboTests",
433 srcs: [
434 "tests/robolectric/src/**/*.kt",
435 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000436 ":SystemUI-tests-utils",
David Saffb2319612023-10-19 14:14:16 -0400437 ":SystemUI-tests-multivalent",
Kevin Liud3793232023-02-09 20:37:27 +0000438 ],
439 static_libs: [
Beverly7c6fc662023-11-16 17:33:35 +0000440 "dagger2",
Kevin Liud3793232023-02-09 20:37:27 +0000441 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400442 "androidx.core_core-animation-testing",
Kevin Liud3793232023-02-09 20:37:27 +0000443 "androidx.test.ext.junit",
444 "inline-mockito-robolectric-prebuilt",
Jeff DeCew52c6a8b2023-12-21 19:21:03 +0000445 "platform-parametric-runner-lib",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100446 "SystemUICustomizationTestUtils",
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400447 "kosmos",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000448 ],
449 libs: [
450 "android.test.runner",
451 "android.test.base",
452 "android.test.mock",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000453 "truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000454 ],
Kevin Liud3793232023-02-09 20:37:27 +0000455
456 upstream: true,
457
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000458 instrumentation_for: "SystemUIRobo-stub",
459 java_resource_dirs: ["tests/robolectric/config"],
Beverly56039f52023-11-13 21:56:33 +0000460 plugins: [
461 "dagger2-compiler",
462 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000463}
464
Jeff Sharkey0b319172024-01-25 10:58:48 -0700465android_ravenwood_test {
466 name: "SystemUiRavenTests",
467 srcs: [
468 ":SystemUI-tests-utils",
469 ":SystemUI-tests-multivalent",
470 // TODO(b/294256649): pivot to using {.aapt.jar} and re-enable
471 // use_resource_processor: true when better supported by soong
472 ":SystemUIRobo-stub{.aapt.srcjar}",
473 ],
474 static_libs: [
475 "SystemUI-core",
476 "SystemUI-res",
477 "SystemUI-tests-base",
478 "androidx.test.uiautomator_uiautomator",
479 "androidx.core_core-animation-testing",
480 "androidx.test.ext.junit",
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400481 "kosmos",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700482 ],
483 libs: [
484 "android.test.runner",
485 "android.test.base",
486 "android.test.mock",
487 ],
488 auto_gen_config: true,
489 plugins: [
490 "dagger2-compiler",
491 ],
492}
493
Jared Duke84e94b32022-08-05 13:46:38 -0700494// Opt-out config for optimizing the SystemUI target using R8.
495// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
496// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800497soong_config_module_type {
498 name: "systemui_optimized_java_defaults",
499 module_type: "java_defaults",
500 config_namespace: "ANDROID",
501 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
502 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700503}
504
Jared Duke9dfa77b2021-12-22 13:31:06 -0800505systemui_optimized_java_defaults {
Jared Duke5bf6fb32023-02-23 14:27:47 -0800506 name: "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700507 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800508 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700509 optimize: {
510 enabled: true,
511 optimize: true,
512 shrink: true,
Jared Duke0668af22023-02-23 14:43:31 -0800513 shrink_resources: true,
Jared Duke5ecfe872022-09-08 09:25:30 -0700514 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000515 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700516 },
517 conditions_default: {
518 optimize: {
Jared Duke5ecfe872022-09-08 09:25:30 -0700519 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000520 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700521 },
522 },
523 },
524 },
525}
526
Jason Monka2f2d822018-08-13 11:10:48 -0400527android_app {
528 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700529 defaults: [
530 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800531 "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700532 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400533 static_libs: [
534 "SystemUI-core",
535 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000536 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400537
Colin Crossc23cde42023-06-21 11:22:11 -0700538 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400539 platform_apis: true,
Jeongik Chad45d9e112019-12-04 13:38:39 +0900540 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400541 certificate: "platform",
542 privileged: true,
543
Colin Cross6954ea72023-07-18 10:52:21 -0700544 kotlincflags: ["-Xjvm-default=all"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700545
Jason Monka2f2d822018-08-13 11:10:48 -0400546 dxflags: ["--multi-dex"],
Jared Duke5bf6fb32023-02-23 14:27:47 -0800547 optimize: {
548 proguard_flags_files: ["proguard.flags"],
549 },
Winson Chungb754f522020-08-03 22:17:08 -0700550 required: [
551 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700552 "wmshell.protolog.json.gz",
Pablo Gamito5fe2c802024-02-12 12:48:48 +0000553 "wmshell.protolog.pb",
Winson Chungb754f522020-08-03 22:17:08 -0700554 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400555}