blob: bed95a584c27cf51340ef76359543a7f2923eab7 [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",
Coco Duan68a5f422024-01-04 07:56:13 +000069 "androidx.compose.material_material-icons-extended",
Jordan Demeulenaerebf43b1d2022-12-16 13:00:23 +010070 "androidx.activity_activity-compose",
Jordan Demeulenaere0bbebad2023-07-06 10:19:49 +020071 "androidx.compose.animation_animation-graphics",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010072 ],
73
74 // By default, Compose is disabled and we compile the ComposeFacade
75 // in compose/facade/disabled/.
76 conditions_default: {
77 srcs: ["compose/facade/disabled/src/**/*.kt"],
78 static_libs: [],
79 },
80 },
81 },
82}
83
Jason Monka2f2d822018-08-13 11:10:48 -040084java_library {
85 name: "SystemUI-proto",
86
87 srcs: ["src/**/*.proto"],
88
89 proto: {
90 type: "nano",
91 },
Winson Chungeb1aa3d2020-08-25 19:02:29 -070092
93 libs: [
94 "WindowManager-Shell-proto",
95 ],
Jason Monka2f2d822018-08-13 11:10:48 -040096}
97
98java_library {
99 name: "SystemUI-tags",
100 srcs: ["src/com/android/systemui/EventLogTags.logtags"],
101}
102
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400103filegroup {
104 name: "ReleaseJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400105 srcs: [
106 "src-release/**/*.kt",
107 "src-release/**/*.java",
108 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400109}
110
111filegroup {
112 name: "DebugJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400113 srcs: [
114 "src-debug/**/*.kt",
115 "src-debug/**/*.java",
116 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400117}
118
Xiaozhen Lin53063042022-11-23 02:18:08 +0000119//Create a library to expose SystemUI's resources to other modules.
120android_library {
121 name: "SystemUI-res",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700122 use_resource_processor: true,
Xiaozhen Lin53063042022-11-23 02:18:08 +0000123 resource_dirs: [
124 "res-product",
125 "res-keyguard",
126 "res",
127 ],
128 static_libs: [
129 "SystemUISharedLib",
Hawkwood Glazier057df3a2023-06-14 20:10:21 +0000130 "SystemUICustomizationLib",
Xiaozhen Lin53063042022-11-23 02:18:08 +0000131 "SettingsLib",
132 "androidx.leanback_leanback",
133 "androidx.slice_slice-core",
134 "androidx.slice_slice-view",
135 ],
136 manifest: "AndroidManifest-res.xml",
137}
138
Jason Monka2f2d822018-08-13 11:10:48 -0400139android_library {
140 name: "SystemUI-core",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100141 defaults: [
142 "SystemUI_compose_defaults",
143 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400144 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -0400145 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -0400146 "src/**/*.java",
147 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -0400148 ":ReleaseJavaFiles",
Jason Monka2f2d822018-08-13 11:10:48 -0400149 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400150 product_variables: {
151 debuggable: {
152 srcs: [":DebugJavaFiles"],
153 exclude_srcs: [":ReleaseJavaFiles"],
154 },
155 },
Colin Crossc23cde42023-06-21 11:22:11 -0700156 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400157 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700158 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700159 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800160 "WindowManager-Shell",
Luca Zuccarini674ecf02023-12-20 15:51:55 +0100161 "PlatformAnimationLib",
Darrell Shi60006322023-04-06 17:58:40 +0000162 "SystemUICommon",
163 "SystemUICustomizationLib",
Darrell Shi1a21b362023-04-28 19:51:44 +0000164 "SystemUILogLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400165 "SystemUIPluginLib",
166 "SystemUISharedLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800167 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400168 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400169 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000170 "com_android_systemui_shared_flags_lib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700171 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500172 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400173 "androidx.legacy_legacy-support-v4",
174 "androidx.recyclerview_recyclerview",
175 "androidx.preference_preference",
176 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500177 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400178 "androidx.mediarouter_mediarouter",
179 "androidx.palette_palette",
180 "androidx.legacy_legacy-preference-v14",
181 "androidx.leanback_leanback",
182 "androidx.slice_slice-core",
183 "androidx.slice_slice-view",
184 "androidx.slice_slice-builders",
185 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800186 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400187 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200188 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800189 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400190 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500191 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000192 "androidx.room_room-runtime",
193 "androidx.room_room-ktx",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800194 "com.google.android.material_material",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000195 "device_state_flags_lib",
Steve Elliotta7d72052020-12-16 23:04:19 -0500196 "kotlinx_coroutines_android",
197 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800198 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400199 "SystemUI-tags",
200 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000201 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700202 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400203 "dagger2",
Brett Chabotfc8675a2023-03-27 10:33:10 -0700204 "jsr305",
Andy Wickham64e34102021-03-07 16:02:01 -0800205 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400206 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400207 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000208 "motion_tool_lib",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100209 "notification_flags_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400210 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200211 libs: [
212 "keepanno-annotations",
213 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400214 manifest: "AndroidManifest.xml",
215
Coco Duand8ef1812023-10-19 21:35:01 +0000216 javacflags: [
217 "-Adagger.fastInit=enabled",
Dave Mankofff69c3422024-01-26 20:59:11 +0000218 "-Adagger.explicitBindingConflictsWithInject=ERROR",
219 "-Adagger.strictMultibindingValidation=enabled",
Coco Duand8ef1812023-10-19 21:35:01 +0000220 "-Aroom.schemaLocation=frameworks/base/packages/SystemUI/schemas",
221 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700222 kotlincflags: ["-Xjvm-default=all"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500223
Coco Duand8ef1812023-10-19 21:35:01 +0000224 plugins: [
225 "androidx.room_room-compiler-plugin",
226 "dagger2-compiler",
227 ],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000228
229 lint: {
230 extra_check_modules: ["SystemUILintChecker"],
Michal Brzezinskid552d1f2023-09-29 15:00:19 +0100231 warning_checks: ["MissingApacheLicenseDetector"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000232 },
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",
Luca Zuccarini674ecf02023-12-20 15:51:55 +0100280 "PlatformAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400281 "SystemUIPluginLib",
282 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000283 "SystemUICustomizationLib",
Ioana Alexandru7678de9e2023-12-04 21:07:23 +0100284 "SystemUICustomizationTestUtils",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700285 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400286 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400287 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000288 "com_android_systemui_shared_flags_lib",
Jeff DeCew91a53962023-10-06 15:40:23 +0000289 "flag-junit-base",
Jeff DeCewcaef3b32023-11-13 03:13:13 +0000290 "platform-parametric-runner-lib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500291 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400292 "androidx.legacy_legacy-support-v4",
293 "androidx.recyclerview_recyclerview",
294 "androidx.preference_preference",
295 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500296 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400297 "androidx.mediarouter_mediarouter",
298 "androidx.palette_palette",
299 "androidx.legacy_legacy-preference-v14",
300 "androidx.leanback_leanback",
301 "androidx.slice_slice-core",
302 "androidx.slice_slice-view",
303 "androidx.slice_slice-builders",
304 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800305 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400306 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200307 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800308 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400309 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500310 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000311 "androidx.room_room-runtime",
312 "androidx.room_room-ktx",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000313 "device_state_flags_lib",
Pinyao Tingee191b12020-04-29 18:35:39 -0700314 "kotlinx-coroutines-android",
315 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700316 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000317 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700318 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400319 "SystemUI-tags",
320 "SystemUI-proto",
321 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900322 "hamcrest-library",
323 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400324 "testables",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000325 "truth",
Lucas Dupine37369f2021-08-31 00:19:39 +0000326 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700327 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400328 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800329 "jsr330",
330 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400331 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000332 "motion_tool_lib",
Johannes Gallmannb642af92022-10-14 09:58:09 +0000333 "androidx.core_core-animation-testing-nodeps",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100334 "androidx.compose.ui_ui",
Riley Jones84156fc2023-09-06 22:27:37 +0000335 "flag-junit",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700336 "ravenwood-junit",
Riley Jones84156fc2023-09-06 22:27:37 +0000337 "platform-test-annotations",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100338 "notification_flags_lib",
Jason Monkae7ced22018-08-22 16:56:58 -0400339 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000340}
341
342android_library {
343 name: "SystemUI-tests",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700344 use_resource_processor: true,
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100345 defaults: [
346 "SystemUI_compose_defaults",
347 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000348 manifest: "tests/AndroidManifest-base.xml",
349 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",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100368 "SystemUICustomizationTestUtils",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000369 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400370 libs: [
371 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400372 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200373 "android.test.mock",
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200374 "keepanno-annotations",
Jason Monkae7ced22018-08-22 16:56:58 -0400375 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700376 kotlincflags: ["-Xjvm-default=all"],
Jason Monkae7ced22018-08-22 16:56:58 -0400377 aaptflags: [
378 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700379 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400380 ],
Coco Duand8ef1812023-10-19 21:35:01 +0000381 plugins: [
382 "androidx.room_room-compiler-plugin",
383 "dagger2-compiler",
384 ],
Cole Faust17f1e722022-08-16 15:30:26 -0700385 lint: {
386 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700387 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700388 },
Jason Monkae7ced22018-08-22 16:56:58 -0400389}
390
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000391android_app {
392 name: "SystemUIRobo-stub",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700393 // SystemUiRavenTests references the .aapt.srcjar
394 use_resource_processor: false,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000395 defaults: [
396 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800397 "SystemUI_optimized_defaults",
Kevin Liud3793232023-02-09 20:37:27 +0000398 "SystemUI_compose_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000399 ],
400 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000401
402 srcs: [
403 "src/**/*.kt",
404 "src/**/*.java",
405 "src/**/I*.aidl",
406 ":ReleaseJavaFiles",
407 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000408 static_libs: [
409 "SystemUI-tests-base",
410 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200411 libs: [
412 "keepanno-annotations",
413 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000414 aaptflags: [
415 "--extra-packages",
416 "com.android.systemui",
417 ],
418 dont_merge_manifests: true,
419 platform_apis: true,
420 system_ext_specific: true,
421 certificate: "platform",
422 privileged: true,
423 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000424 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000425 optimize: {
426 shrink_resources: false,
427 proguard_flags_files: ["proguard.flags"],
428 },
Kevin Liud3793232023-02-09 20:37:27 +0000429
430 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000431}
432
433android_robolectric_test {
434 name: "SystemUiRoboTests",
435 srcs: [
436 "tests/robolectric/src/**/*.kt",
437 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000438 ":SystemUI-tests-utils",
David Saffb2319612023-10-19 14:14:16 -0400439 ":SystemUI-tests-multivalent",
Kevin Liud3793232023-02-09 20:37:27 +0000440 ],
441 static_libs: [
Beverly7c6fc662023-11-16 17:33:35 +0000442 "dagger2",
Kevin Liud3793232023-02-09 20:37:27 +0000443 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400444 "androidx.core_core-animation-testing",
Kevin Liud3793232023-02-09 20:37:27 +0000445 "androidx.test.ext.junit",
446 "inline-mockito-robolectric-prebuilt",
Jeff DeCew52c6a8b2023-12-21 19:21:03 +0000447 "platform-parametric-runner-lib",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100448 "SystemUICustomizationTestUtils",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000449 ],
450 libs: [
451 "android.test.runner",
452 "android.test.base",
453 "android.test.mock",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000454 "truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000455 ],
Kevin Liud3793232023-02-09 20:37:27 +0000456
457 upstream: true,
458
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000459 instrumentation_for: "SystemUIRobo-stub",
460 java_resource_dirs: ["tests/robolectric/config"],
Beverly56039f52023-11-13 21:56:33 +0000461 plugins: [
462 "dagger2-compiler",
463 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000464}
465
Jeff Sharkey0b319172024-01-25 10:58:48 -0700466android_ravenwood_test {
467 name: "SystemUiRavenTests",
468 srcs: [
469 ":SystemUI-tests-utils",
470 ":SystemUI-tests-multivalent",
471 // TODO(b/294256649): pivot to using {.aapt.jar} and re-enable
472 // use_resource_processor: true when better supported by soong
473 ":SystemUIRobo-stub{.aapt.srcjar}",
474 ],
475 static_libs: [
476 "SystemUI-core",
477 "SystemUI-res",
478 "SystemUI-tests-base",
479 "androidx.test.uiautomator_uiautomator",
480 "androidx.core_core-animation-testing",
481 "androidx.test.ext.junit",
482 ],
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 Chad45d9e12019-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}