blob: e2af6313fc9720e2714a1dc6ff0dcc78890b6272 [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",
Steve Elliott4c432012024-04-15 11:41:14 -0400120 "SystemUI-shared-utils",
Jerry Chang919d1d22020-07-16 12:31:24 +0800121 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400122 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400123 "com_android_systemui_flags_lib",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700124 "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700125 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500126 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400127 "androidx.legacy_legacy-support-v4",
128 "androidx.recyclerview_recyclerview",
129 "androidx.preference_preference",
130 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500131 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400132 "androidx.mediarouter_mediarouter",
133 "androidx.palette_palette",
134 "androidx.legacy_legacy-preference-v14",
135 "androidx.leanback_leanback",
136 "androidx.slice_slice-core",
137 "androidx.slice_slice-view",
138 "androidx.slice_slice-builders",
139 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800140 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400141 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200142 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800143 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400144 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500145 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000146 "androidx.room_room-runtime",
147 "androidx.room_room-ktx",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800148 "com.google.android.material_material",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000149 "device_state_flags_lib",
Steve Elliotta7d72052020-12-16 23:04:19 -0500150 "kotlinx_coroutines_android",
151 "kotlinx_coroutines",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700152 "//frameworks/libs/systemui:iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400153 "SystemUI-tags",
154 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000155 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700156 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400157 "dagger2",
Brett Chabotfc8675a2023-03-27 10:33:10 -0700158 "jsr305",
Andy Wickham64e34102021-03-07 16:02:01 -0800159 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400160 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400161 "LowLightDreamLib",
Stefan Andonian2de9db72024-03-08 04:43:38 +0000162 "TraceurCommon",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700163 "//frameworks/libs/systemui:motion_tool_lib",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100164 "notification_flags_lib",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100165 "PlatformComposeCore",
166 "PlatformComposeSceneTransitionLayout",
167 "androidx.compose.runtime_runtime",
168 "androidx.compose.material3_material3",
169 "androidx.compose.material_material-icons-extended",
170 "androidx.activity_activity-compose",
171 "androidx.compose.animation_animation-graphics",
Jason Monka2f2d822018-08-13 11:10:48 -0400172 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200173 libs: [
174 "keepanno-annotations",
175 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400176 manifest: "AndroidManifest.xml",
177
Coco Duand8ef1812023-10-19 21:35:01 +0000178 javacflags: [
179 "-Adagger.fastInit=enabled",
Dave Mankofff69c3422024-01-26 20:59:11 +0000180 "-Adagger.explicitBindingConflictsWithInject=ERROR",
181 "-Adagger.strictMultibindingValidation=enabled",
Coco Duand8ef1812023-10-19 21:35:01 +0000182 "-Aroom.schemaLocation=frameworks/base/packages/SystemUI/schemas",
183 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700184 kotlincflags: ["-Xjvm-default=all"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500185
Coco Duand8ef1812023-10-19 21:35:01 +0000186 plugins: [
187 "androidx.room_room-compiler-plugin",
188 "dagger2-compiler",
189 ],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000190
191 lint: {
192 extra_check_modules: ["SystemUILintChecker"],
Michal Brzezinskid552d1f2023-09-29 15:00:19 +0100193 warning_checks: ["MissingApacheLicenseDetector"],
Peter Kalauskasde4b6e12024-04-18 17:22:49 -0700194 baseline_filename: "lint-baseline.xml",
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000195 },
Jason Monka2f2d822018-08-13 11:10:48 -0400196}
197
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900198filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500199 name: "AAA-src",
200 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
201 path: "tests/src",
202}
203
204filegroup {
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400205 name: "kosmos-src",
206 srcs: ["tests/utils/kosmos/src/**/*.kt"],
207 path: "tests/utils/kosmos",
208}
209
210java_library {
211 name: "kosmos",
212 host_supported: true,
213 srcs: [":kosmos-src"],
214 static_libs: [
215 "kotlin-reflect",
216 "kotlin-stdlib",
217 ],
218}
219
220filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900221 name: "SystemUI-tests-utils",
222 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200223 "tests/utils/src/**/*.java",
224 "tests/utils/src/**/*.kt",
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400225 ":kosmos-src",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400226 ],
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400227 path: "tests/utils",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900228}
229
Kevin Liud3793232023-02-09 20:37:27 +0000230filegroup {
David Saffb2319612023-10-19 14:14:16 -0400231 name: "SystemUI-tests-multivalent",
232 srcs: [
233 "multivalentTests/src/**/*.kt",
Rex Hoffman1477e0f2023-11-28 17:18:28 +0000234 "multivalentTests/src/**/*.java",
David Saffb2319612023-10-19 14:14:16 -0400235 ],
236 path: "multivalentTests/src",
237}
238
Bryce Leea5b08082021-10-06 11:34:56 -0700239java_library {
240 name: "SystemUI-tests-concurrency",
241 srcs: [
242 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
243 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200244 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
245 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700246 ],
247 jarjar_rules: ":jarjar-rules-shared",
248}
249
Jason Monkae7ced22018-08-22 16:56:58 -0400250android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000251 name: "SystemUI-tests-base",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700252 use_resource_processor: true,
Sunny Goyaleb18d392020-02-07 16:48:14 -0800253 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400254 resource_dirs: [
255 "tests/res",
Jason Monkae7ced22018-08-22 16:56:58 -0400256 ],
Luca Zuccarini23b4cb22024-02-20 16:55:21 +0000257 asset_dirs: [
258 "tests/goldens",
259 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400260 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700261 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700262 "WifiTrackerLib",
Luca Zuccarini674ecf02023-12-20 15:51:55 +0100263 "PlatformAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400264 "SystemUIPluginLib",
265 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000266 "SystemUICustomizationLib",
Ioana Alexandru7678de9e2023-12-04 21:07:23 +0100267 "SystemUICustomizationTestUtils",
Steve Elliott4c432012024-04-15 11:41:14 -0400268 "SystemUI-shared-utils",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700269 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400270 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400271 "com_android_systemui_flags_lib",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700272 "//frameworks/libs/systemui:com_android_systemui_shared_flags_lib",
Jeff DeCew91a53962023-10-06 15:40:23 +0000273 "flag-junit-base",
Jeff DeCewcaef3b32023-11-13 03:13:13 +0000274 "platform-parametric-runner-lib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500275 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400276 "androidx.legacy_legacy-support-v4",
277 "androidx.recyclerview_recyclerview",
278 "androidx.preference_preference",
279 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500280 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400281 "androidx.mediarouter_mediarouter",
282 "androidx.palette_palette",
283 "androidx.legacy_legacy-preference-v14",
284 "androidx.leanback_leanback",
285 "androidx.slice_slice-core",
286 "androidx.slice_slice-view",
287 "androidx.slice_slice-builders",
288 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800289 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400290 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200291 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800292 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400293 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500294 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000295 "androidx.room_room-runtime",
296 "androidx.room_room-ktx",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000297 "device_state_flags_lib",
Pinyao Tingee191b12020-04-29 18:35:39 -0700298 "kotlinx-coroutines-android",
299 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700300 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000301 "kotlin-reflect",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700302 "//frameworks/libs/systemui:iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400303 "SystemUI-tags",
304 "SystemUI-proto",
305 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900306 "hamcrest-library",
307 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400308 "testables",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000309 "truth",
Lucas Dupine37369f2021-08-31 00:19:39 +0000310 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700311 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400312 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800313 "jsr330",
314 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400315 "LowLightDreamLib",
Peter Kalauskascd50f532024-04-02 15:41:14 -0700316 "//frameworks/libs/systemui:motion_tool_lib",
Colin Cross64ee6e22024-03-25 15:21:29 -0700317 "androidx.core_core-animation-testing",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100318 "androidx.compose.ui_ui",
Riley Jones84156fc2023-09-06 22:27:37 +0000319 "flag-junit",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700320 "ravenwood-junit",
Riley Jones84156fc2023-09-06 22:27:37 +0000321 "platform-test-annotations",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100322 "notification_flags_lib",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100323 "PlatformComposeCore",
324 "PlatformComposeSceneTransitionLayout",
325 "androidx.compose.runtime_runtime",
326 "androidx.compose.material3_material3",
327 "androidx.compose.material_material-icons-extended",
328 "androidx.activity_activity-compose",
329 "androidx.compose.animation_animation-graphics",
Stefan Andonian2de9db72024-03-08 04:43:38 +0000330 "TraceurCommon",
Jason Monkae7ced22018-08-22 16:56:58 -0400331 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000332}
333
334android_library {
335 name: "SystemUI-tests",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700336 use_resource_processor: true,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000337 manifest: "tests/AndroidManifest-base.xml",
Colin Cross164493b2024-03-05 13:32:44 -0800338 resource_dirs: [],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000339 additional_manifests: ["tests/AndroidManifest.xml"],
340 srcs: [
341 "tests/src/**/*.kt",
342 "tests/src/**/*.java",
343 "src/**/*.kt",
344 "src/**/*.java",
345 "src/**/I*.aidl",
346 ":ReleaseJavaFiles",
David Saffb2319612023-10-19 14:14:16 -0400347 ":SystemUI-tests-multivalent",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000348 ":SystemUI-tests-utils",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100349 "compose/features/src/**/*.kt",
350 "compose/facade/enabled/src/**/*.kt",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000351 ],
352 static_libs: [
Peter Kalauskascd50f532024-04-02 15:41:14 -0700353 "//frameworks/libs/systemui:compilelib",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000354 "SystemUI-tests-base",
355 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400356 "androidx.core_core-animation-testing",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000357 "mockito-target-extended-minus-junit4",
Mark Renoufe03d1c62024-03-25 11:59:03 -0400358 "mockito-kotlin2",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000359 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000360 "androidx.test.ext.truth",
Colin Cross852cd142023-08-11 16:53:55 -0700361 "kotlin-test",
Luca Zuccarini23b4cb22024-02-20 16:55:21 +0000362 "platform-screenshot-diff-core",
363 "PlatformMotionTesting",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100364 "SystemUICustomizationTestUtils",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100365 "androidx.compose.runtime_runtime",
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400366 "kosmos",
Fangqiu Sub58fa972023-12-19 18:14:55 +0000367 "androidx.test.rules",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000368 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400369 libs: [
370 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400371 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200372 "android.test.mock",
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200373 "keepanno-annotations",
Jason Monkae7ced22018-08-22 16:56:58 -0400374 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700375 kotlincflags: ["-Xjvm-default=all"],
Jason Monkae7ced22018-08-22 16:56:58 -0400376 aaptflags: [
377 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700378 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400379 ],
Coco Duand8ef1812023-10-19 21:35:01 +0000380 plugins: [
381 "androidx.room_room-compiler-plugin",
382 "dagger2-compiler",
383 ],
Cole Faust17f1e722022-08-16 15:30:26 -0700384 lint: {
385 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700386 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700387 },
Jason Monkae7ced22018-08-22 16:56:58 -0400388}
389
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000390android_app {
391 name: "SystemUIRobo-stub",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700392 // SystemUiRavenTests references the .aapt.srcjar
393 use_resource_processor: false,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000394 defaults: [
395 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800396 "SystemUI_optimized_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000397 ],
398 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000399
400 srcs: [
401 "src/**/*.kt",
402 "src/**/*.java",
403 "src/**/I*.aidl",
404 ":ReleaseJavaFiles",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100405 "compose/features/src/**/*.kt",
406 "compose/facade/enabled/src/**/*.kt",
Kevin Liud3793232023-02-09 20:37:27 +0000407 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000408 static_libs: [
Peter Kalauskascd50f532024-04-02 15:41:14 -0700409 "//frameworks/libs/systemui:compilelib",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000410 "SystemUI-tests-base",
Jordan Demeulenaere941e6132024-02-28 14:37:37 +0100411 "androidx.compose.runtime_runtime",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000412 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200413 libs: [
414 "keepanno-annotations",
415 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000416 aaptflags: [
417 "--extra-packages",
418 "com.android.systemui",
419 ],
420 dont_merge_manifests: true,
421 platform_apis: true,
422 system_ext_specific: true,
423 certificate: "platform",
424 privileged: true,
425 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000426 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000427 optimize: {
428 shrink_resources: false,
Rico Wind65526b22024-03-19 09:02:58 +0100429 optimized_shrink_resources: false,
Kevin Liu092b8212023-02-15 05:42:34 +0000430 proguard_flags_files: ["proguard.flags"],
431 },
Kevin Liud3793232023-02-09 20:37:27 +0000432
433 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000434}
435
436android_robolectric_test {
437 name: "SystemUiRoboTests",
438 srcs: [
439 "tests/robolectric/src/**/*.kt",
440 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000441 ":SystemUI-tests-utils",
David Saffb2319612023-10-19 14:14:16 -0400442 ":SystemUI-tests-multivalent",
Kevin Liud3793232023-02-09 20:37:27 +0000443 ],
444 static_libs: [
Beverly7c6fc662023-11-16 17:33:35 +0000445 "dagger2",
Kevin Liud3793232023-02-09 20:37:27 +0000446 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400447 "androidx.core_core-animation-testing",
Kevin Liud3793232023-02-09 20:37:27 +0000448 "androidx.test.ext.junit",
449 "inline-mockito-robolectric-prebuilt",
Jeff DeCew52c6a8b2023-12-21 19:21:03 +0000450 "platform-parametric-runner-lib",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100451 "SystemUICustomizationTestUtils",
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400452 "kosmos",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000453 ],
454 libs: [
455 "android.test.runner",
456 "android.test.base",
457 "android.test.mock",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000458 "truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000459 ],
Kevin Liud3793232023-02-09 20:37:27 +0000460
461 upstream: true,
462
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000463 instrumentation_for: "SystemUIRobo-stub",
464 java_resource_dirs: ["tests/robolectric/config"],
Beverly56039f52023-11-13 21:56:33 +0000465 plugins: [
466 "dagger2-compiler",
467 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000468}
469
Jeff Sharkey0b319172024-01-25 10:58:48 -0700470android_ravenwood_test {
471 name: "SystemUiRavenTests",
472 srcs: [
473 ":SystemUI-tests-utils",
474 ":SystemUI-tests-multivalent",
475 // TODO(b/294256649): pivot to using {.aapt.jar} and re-enable
476 // use_resource_processor: true when better supported by soong
477 ":SystemUIRobo-stub{.aapt.srcjar}",
478 ],
479 static_libs: [
480 "SystemUI-core",
481 "SystemUI-res",
482 "SystemUI-tests-base",
483 "androidx.test.uiautomator_uiautomator",
484 "androidx.core_core-animation-testing",
485 "androidx.test.ext.junit",
Steve Elliottb42fe7c2024-03-28 14:00:20 -0400486 "kosmos",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700487 ],
488 libs: [
489 "android.test.runner",
490 "android.test.base",
491 "android.test.mock",
492 ],
493 auto_gen_config: true,
494 plugins: [
495 "dagger2-compiler",
496 ],
497}
498
Jared Duke84e94b32022-08-05 13:46:38 -0700499// Opt-out config for optimizing the SystemUI target using R8.
500// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
501// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800502soong_config_module_type {
503 name: "systemui_optimized_java_defaults",
504 module_type: "java_defaults",
505 config_namespace: "ANDROID",
506 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
507 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700508}
509
Jared Duke9dfa77b2021-12-22 13:31:06 -0800510systemui_optimized_java_defaults {
Jared Duke5bf6fb32023-02-23 14:27:47 -0800511 name: "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700512 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800513 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700514 optimize: {
515 enabled: true,
516 optimize: true,
517 shrink: true,
Jared Duke0668af22023-02-23 14:43:31 -0800518 shrink_resources: true,
Rico Wind65526b22024-03-19 09:02:58 +0100519 optimized_shrink_resources: true,
Jared Duke5ecfe872022-09-08 09:25:30 -0700520 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000521 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700522 },
523 conditions_default: {
524 optimize: {
Jared Duke5ecfe872022-09-08 09:25:30 -0700525 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000526 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700527 },
528 },
529 },
530 },
531}
532
Jason Monka2f2d822018-08-13 11:10:48 -0400533android_app {
534 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700535 defaults: [
536 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800537 "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700538 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400539 static_libs: [
540 "SystemUI-core",
541 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000542 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400543
Colin Crossc23cde42023-06-21 11:22:11 -0700544 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400545 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900546 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400547 certificate: "platform",
548 privileged: true,
549
Colin Cross6954ea72023-07-18 10:52:21 -0700550 kotlincflags: ["-Xjvm-default=all"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700551
Jason Monka2f2d822018-08-13 11:10:48 -0400552 dxflags: ["--multi-dex"],
Jared Duke5bf6fb32023-02-23 14:27:47 -0800553 optimize: {
554 proguard_flags_files: ["proguard.flags"],
555 },
Winson Chungb754f522020-08-03 22:17:08 -0700556 required: [
557 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700558 "wmshell.protolog.json.gz",
Pablo Gamito5fe2c802024-02-12 12:48:48 +0000559 "wmshell.protolog.pb",
Winson Chungb754f522020-08-03 22:17:08 -0700560 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400561}