blob: 999507b300e4da6773e51d341bd7083cf9f4f942 [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
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010035// Opt-in configuration for code depending on Jetpack Compose.
36soong_config_module_type {
37 name: "systemui_compose_java_defaults",
38 module_type: "java_defaults",
39 config_namespace: "ANDROID",
40 bool_variables: ["SYSTEMUI_USE_COMPOSE"],
41 properties: [
42 "srcs",
43 "static_libs",
44 ],
45}
46
47systemui_compose_java_defaults {
48 name: "SystemUI_compose_defaults",
49 soong_config_variables: {
50 SYSTEMUI_USE_COMPOSE: {
51 // Because files in compose/features/ depend on SystemUI
52 // code, we compile those files when compiling SystemUI-core.
53 // We also compile the ComposeFacade in
54 // compose/facade/enabled/.
55 srcs: [
56 "compose/features/src/**/*.kt",
57 "compose/facade/enabled/src/**/*.kt",
58 ],
59
60 // The dependencies needed by SystemUIComposeFeatures,
61 // except for SystemUI-core.
62 // Copied from compose/features/Android.bp.
63 static_libs: [
Jordan Demeulenaere8a1747d2022-12-28 11:11:42 +010064 "PlatformComposeCore",
Jordan Demeulenaere6d5bea52023-10-12 14:12:00 +020065 "PlatformComposeSceneTransitionLayout",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010066
67 "androidx.compose.runtime_runtime",
68 "androidx.compose.material3_material3",
Jordan Demeulenaerebf43b1d2022-12-16 13:00:23 +010069 "androidx.activity_activity-compose",
Jordan Demeulenaere0bbebad2023-07-06 10:19:49 +020070 "androidx.compose.animation_animation-graphics",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010071 ],
72
73 // By default, Compose is disabled and we compile the ComposeFacade
74 // in compose/facade/disabled/.
75 conditions_default: {
76 srcs: ["compose/facade/disabled/src/**/*.kt"],
77 static_libs: [],
78 },
79 },
80 },
81}
82
Jason Monka2f2d822018-08-13 11:10:48 -040083java_library {
84 name: "SystemUI-proto",
85
86 srcs: ["src/**/*.proto"],
87
88 proto: {
89 type: "nano",
90 },
Winson Chungeb1aa3d2020-08-25 19:02:29 -070091
92 libs: [
93 "WindowManager-Shell-proto",
94 ],
Jason Monka2f2d822018-08-13 11:10:48 -040095}
96
97java_library {
98 name: "SystemUI-tags",
99 srcs: ["src/com/android/systemui/EventLogTags.logtags"],
100}
101
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400102filegroup {
103 name: "ReleaseJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400104 srcs: [
105 "src-release/**/*.kt",
106 "src-release/**/*.java",
107 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400108}
109
110filegroup {
111 name: "DebugJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400112 srcs: [
113 "src-debug/**/*.kt",
114 "src-debug/**/*.java",
115 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400116}
117
Xiaozhen Lin53063042022-11-23 02:18:08 +0000118//Create a library to expose SystemUI's resources to other modules.
119android_library {
120 name: "SystemUI-res",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700121 use_resource_processor: true,
Xiaozhen Lin53063042022-11-23 02:18:08 +0000122 resource_dirs: [
123 "res-product",
124 "res-keyguard",
125 "res",
126 ],
127 static_libs: [
128 "SystemUISharedLib",
Hawkwood Glazier057df3a2023-06-14 20:10:21 +0000129 "SystemUICustomizationLib",
Xiaozhen Lin53063042022-11-23 02:18:08 +0000130 "SettingsLib",
131 "androidx.leanback_leanback",
132 "androidx.slice_slice-core",
133 "androidx.slice_slice-view",
134 ],
135 manifest: "AndroidManifest-res.xml",
136}
137
Jason Monka2f2d822018-08-13 11:10:48 -0400138android_library {
139 name: "SystemUI-core",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100140 defaults: [
141 "SystemUI_compose_defaults",
142 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400143 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -0400144 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -0400145 "src/**/*.java",
146 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -0400147 ":ReleaseJavaFiles",
Jason Monka2f2d822018-08-13 11:10:48 -0400148 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400149 product_variables: {
150 debuggable: {
151 srcs: [":DebugJavaFiles"],
152 exclude_srcs: [":ReleaseJavaFiles"],
153 },
154 },
Colin Crossc23cde42023-06-21 11:22:11 -0700155 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400156 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700157 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700158 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800159 "WindowManager-Shell",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200160 "SystemUIAnimationLib",
Darrell Shi60006322023-04-06 17:58:40 +0000161 "SystemUICommon",
162 "SystemUICustomizationLib",
Darrell Shi1a21b362023-04-28 19:51:44 +0000163 "SystemUILogLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400164 "SystemUIPluginLib",
165 "SystemUISharedLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800166 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400167 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400168 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000169 "com_android_systemui_shared_flags_lib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700170 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500171 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400172 "androidx.legacy_legacy-support-v4",
173 "androidx.recyclerview_recyclerview",
174 "androidx.preference_preference",
175 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500176 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400177 "androidx.mediarouter_mediarouter",
178 "androidx.palette_palette",
179 "androidx.legacy_legacy-preference-v14",
180 "androidx.leanback_leanback",
181 "androidx.slice_slice-core",
182 "androidx.slice_slice-view",
183 "androidx.slice_slice-builders",
184 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800185 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400186 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200187 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800188 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400189 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500190 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000191 "androidx.room_room-runtime",
192 "androidx.room_room-ktx",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800193 "com.google.android.material_material",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000194 "device_state_flags_lib",
Steve Elliotta7d72052020-12-16 23:04:19 -0500195 "kotlinx_coroutines_android",
196 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800197 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400198 "SystemUI-tags",
199 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000200 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700201 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400202 "dagger2",
Brett Chabotfc8675a2023-03-27 10:33:10 -0700203 "jsr305",
Andy Wickham64e34102021-03-07 16:02:01 -0800204 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400205 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400206 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000207 "motion_tool_lib",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100208 "notification_flags_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400209 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200210 libs: [
211 "keepanno-annotations",
212 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400213 manifest: "AndroidManifest.xml",
214
Coco Duand8ef1812023-10-19 21:35:01 +0000215 javacflags: [
216 "-Adagger.fastInit=enabled",
Mark Renouf400a1a42024-03-11 16:39:01 -0400217 "-Adagger.explicitBindingConflictsWithInject=ERROR",
218 "-Adagger.strictMultibindingValidation=enabled",
Coco Duand8ef1812023-10-19 21:35:01 +0000219 "-Aroom.schemaLocation=frameworks/base/packages/SystemUI/schemas",
220 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700221 kotlincflags: ["-Xjvm-default=all"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500222
Coco Duand8ef1812023-10-19 21:35:01 +0000223 plugins: [
224 "androidx.room_room-compiler-plugin",
225 "dagger2-compiler",
226 ],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000227
228 lint: {
229 extra_check_modules: ["SystemUILintChecker"],
Michal Brzezinskid552d1f2023-09-29 15:00:19 +0100230 warning_checks: ["MissingApacheLicenseDetector"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000231 },
Zi Wang337b89a2024-03-06 11:39:13 -0800232 skip_jarjar_repackage: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400233}
234
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900235filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500236 name: "AAA-src",
237 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
238 path: "tests/src",
239}
240
241filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900242 name: "SystemUI-tests-utils",
243 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200244 "tests/utils/src/**/*.java",
245 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400246 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200247 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900248}
249
Kevin Liud3793232023-02-09 20:37:27 +0000250filegroup {
David Saffb2319612023-10-19 14:14:16 -0400251 name: "SystemUI-tests-multivalent",
252 srcs: [
253 "multivalentTests/src/**/*.kt",
Rex Hoffman1477e0f2023-11-28 17:18:28 +0000254 "multivalentTests/src/**/*.java",
David Saffb2319612023-10-19 14:14:16 -0400255 ],
256 path: "multivalentTests/src",
257}
258
Bryce Leea5b08082021-10-06 11:34:56 -0700259java_library {
260 name: "SystemUI-tests-concurrency",
261 srcs: [
262 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
263 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200264 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
265 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700266 ],
267 jarjar_rules: ":jarjar-rules-shared",
268}
269
Jason Monkae7ced22018-08-22 16:56:58 -0400270android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000271 name: "SystemUI-tests-base",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700272 use_resource_processor: true,
Sunny Goyaleb18d392020-02-07 16:48:14 -0800273 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400274 resource_dirs: [
275 "tests/res",
Jason Monkae7ced22018-08-22 16:56:58 -0400276 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400277 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700278 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700279 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200280 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400281 "SystemUIPluginLib",
282 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000283 "SystemUICustomizationLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700284 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400285 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400286 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000287 "com_android_systemui_shared_flags_lib",
Jeff DeCew91a53962023-10-06 15:40:23 +0000288 "flag-junit-base",
Jeff DeCewcaef3b32023-11-13 03:13:13 +0000289 "platform-parametric-runner-lib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500290 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400291 "androidx.legacy_legacy-support-v4",
292 "androidx.recyclerview_recyclerview",
293 "androidx.preference_preference",
294 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500295 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400296 "androidx.mediarouter_mediarouter",
297 "androidx.palette_palette",
298 "androidx.legacy_legacy-preference-v14",
299 "androidx.leanback_leanback",
300 "androidx.slice_slice-core",
301 "androidx.slice_slice-view",
302 "androidx.slice_slice-builders",
303 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800304 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400305 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200306 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800307 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400308 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500309 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000310 "androidx.room_room-runtime",
311 "androidx.room_room-ktx",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000312 "device_state_flags_lib",
Pinyao Tingee191b12020-04-29 18:35:39 -0700313 "kotlinx-coroutines-android",
314 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700315 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000316 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700317 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400318 "SystemUI-tags",
319 "SystemUI-proto",
320 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900321 "hamcrest-library",
322 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400323 "testables",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000324 "truth",
Lucas Dupine37369f2021-08-31 00:19:39 +0000325 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700326 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400327 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800328 "jsr330",
329 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400330 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000331 "motion_tool_lib",
Colin Cross64ee6e22024-03-25 15:21:29 -0700332 "androidx.core_core-animation-testing",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100333 "androidx.compose.ui_ui",
Riley Jones84156fc2023-09-06 22:27:37 +0000334 "flag-junit",
335 "platform-test-annotations",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100336 "notification_flags_lib",
Jason Monkae7ced22018-08-22 16:56:58 -0400337 ],
Zi Wang7931c1a2024-03-07 16:07:44 -0800338 skip_jarjar_repackage: true,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000339}
340
341android_library {
342 name: "SystemUI-tests",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700343 use_resource_processor: true,
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100344 defaults: [
345 "SystemUI_compose_defaults",
346 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000347 manifest: "tests/AndroidManifest-base.xml",
Colin Crossf2d85a12024-03-05 13:32:44 -0800348 resource_dirs: [],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000349 additional_manifests: ["tests/AndroidManifest.xml"],
350 srcs: [
351 "tests/src/**/*.kt",
352 "tests/src/**/*.java",
353 "src/**/*.kt",
354 "src/**/*.java",
355 "src/**/I*.aidl",
356 ":ReleaseJavaFiles",
David Saffb2319612023-10-19 14:14:16 -0400357 ":SystemUI-tests-multivalent",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000358 ":SystemUI-tests-utils",
359 ],
360 static_libs: [
361 "SystemUI-tests-base",
362 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400363 "androidx.core_core-animation-testing",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000364 "mockito-target-extended-minus-junit4",
365 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000366 "androidx.test.ext.truth",
Colin Cross852cd142023-08-11 16:53:55 -0700367 "kotlin-test",
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 },
Zi Wang7931c1a2024-03-07 16:07:44 -0800388 skip_jarjar_repackage: true,
Jason Monkae7ced22018-08-22 16:56:58 -0400389}
390
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000391android_app {
392 name: "SystemUIRobo-stub",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700393 use_resource_processor: true,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000394 defaults: [
395 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800396 "SystemUI_optimized_defaults",
Kevin Liud3793232023-02-09 20:37:27 +0000397 "SystemUI_compose_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000398 ],
399 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000400
401 srcs: [
402 "src/**/*.kt",
403 "src/**/*.java",
404 "src/**/I*.aidl",
405 ":ReleaseJavaFiles",
406 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000407 static_libs: [
408 "SystemUI-tests-base",
409 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200410 libs: [
411 "keepanno-annotations",
412 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000413 aaptflags: [
414 "--extra-packages",
415 "com.android.systemui",
416 ],
417 dont_merge_manifests: true,
418 platform_apis: true,
419 system_ext_specific: true,
420 certificate: "platform",
421 privileged: true,
422 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000423 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000424 optimize: {
425 shrink_resources: false,
426 proguard_flags_files: ["proguard.flags"],
427 },
Kevin Liud3793232023-02-09 20:37:27 +0000428
429 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000430}
431
432android_robolectric_test {
433 name: "SystemUiRoboTests",
434 srcs: [
435 "tests/robolectric/src/**/*.kt",
436 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000437 ":SystemUI-tests-utils",
David Saffb2319612023-10-19 14:14:16 -0400438 ":SystemUI-tests-multivalent",
Kevin Liud3793232023-02-09 20:37:27 +0000439 ],
440 static_libs: [
Beverly7c6fc662023-11-16 17:33:35 +0000441 "dagger2",
Kevin Liud3793232023-02-09 20:37:27 +0000442 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400443 "androidx.core_core-animation-testing",
Kevin Liud3793232023-02-09 20:37:27 +0000444 "androidx.test.ext.junit",
445 "inline-mockito-robolectric-prebuilt",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000446 ],
447 libs: [
448 "android.test.runner",
449 "android.test.base",
450 "android.test.mock",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000451 "truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000452 ],
Kevin Liud3793232023-02-09 20:37:27 +0000453
454 upstream: true,
455
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000456 instrumentation_for: "SystemUIRobo-stub",
457 java_resource_dirs: ["tests/robolectric/config"],
Beverly56039f52023-11-13 21:56:33 +0000458 plugins: [
459 "dagger2-compiler",
460 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000461}
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",
Winson Chungb754f522020-08-03 22:17:08 -0700522 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400523}