blob: e63232a874990bc6e6c8c877b83e4ede942f4a62 [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 },
Zi Wange8d2a302024-02-26 18:24:35 -0800233 skip_jarjar_repackage: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400234}
235
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900236filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500237 name: "AAA-src",
238 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
239 path: "tests/src",
240}
241
242filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900243 name: "SystemUI-tests-utils",
244 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200245 "tests/utils/src/**/*.java",
246 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400247 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200248 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900249}
250
Kevin Liud3793232023-02-09 20:37:27 +0000251filegroup {
David Saffb2319612023-10-19 14:14:16 -0400252 name: "SystemUI-tests-multivalent",
253 srcs: [
254 "multivalentTests/src/**/*.kt",
Rex Hoffman1477e0f2023-11-28 17:18:28 +0000255 "multivalentTests/src/**/*.java",
David Saffb2319612023-10-19 14:14:16 -0400256 ],
257 path: "multivalentTests/src",
258}
259
Bryce Leea5b08082021-10-06 11:34:56 -0700260java_library {
261 name: "SystemUI-tests-concurrency",
262 srcs: [
263 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
264 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200265 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
266 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700267 ],
268 jarjar_rules: ":jarjar-rules-shared",
269}
270
Jason Monkae7ced22018-08-22 16:56:58 -0400271android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000272 name: "SystemUI-tests-base",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700273 use_resource_processor: true,
Sunny Goyaleb18d392020-02-07 16:48:14 -0800274 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400275 resource_dirs: [
276 "tests/res",
Jason Monkae7ced22018-08-22 16:56:58 -0400277 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400278 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700279 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700280 "WifiTrackerLib",
Luca Zuccarini674ecf02023-12-20 15:51:55 +0100281 "PlatformAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400282 "SystemUIPluginLib",
283 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000284 "SystemUICustomizationLib",
Ioana Alexandru7678de9e2023-12-04 21:07:23 +0100285 "SystemUICustomizationTestUtils",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700286 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400287 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400288 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000289 "com_android_systemui_shared_flags_lib",
Jeff DeCew91a53962023-10-06 15:40:23 +0000290 "flag-junit-base",
Jeff DeCewcaef3b32023-11-13 03:13:13 +0000291 "platform-parametric-runner-lib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500292 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400293 "androidx.legacy_legacy-support-v4",
294 "androidx.recyclerview_recyclerview",
295 "androidx.preference_preference",
296 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500297 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400298 "androidx.mediarouter_mediarouter",
299 "androidx.palette_palette",
300 "androidx.legacy_legacy-preference-v14",
301 "androidx.leanback_leanback",
302 "androidx.slice_slice-core",
303 "androidx.slice_slice-view",
304 "androidx.slice_slice-builders",
305 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800306 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400307 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200308 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800309 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400310 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500311 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000312 "androidx.room_room-runtime",
313 "androidx.room_room-ktx",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000314 "device_state_flags_lib",
Pinyao Tingee191b12020-04-29 18:35:39 -0700315 "kotlinx-coroutines-android",
316 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700317 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000318 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700319 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400320 "SystemUI-tags",
321 "SystemUI-proto",
322 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900323 "hamcrest-library",
324 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400325 "testables",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000326 "truth",
Lucas Dupine37369f2021-08-31 00:19:39 +0000327 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700328 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400329 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800330 "jsr330",
331 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400332 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000333 "motion_tool_lib",
Johannes Gallmannb642af92022-10-14 09:58:09 +0000334 "androidx.core_core-animation-testing-nodeps",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100335 "androidx.compose.ui_ui",
Riley Jones84156fc2023-09-06 22:27:37 +0000336 "flag-junit",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700337 "ravenwood-junit",
Riley Jones84156fc2023-09-06 22:27:37 +0000338 "platform-test-annotations",
Valentin Iftimea08bd962023-12-11 19:22:51 +0100339 "notification_flags_lib",
Jason Monkae7ced22018-08-22 16:56:58 -0400340 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000341}
342
343android_library {
344 name: "SystemUI-tests",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700345 use_resource_processor: true,
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100346 defaults: [
347 "SystemUI_compose_defaults",
348 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000349 manifest: "tests/AndroidManifest-base.xml",
350 additional_manifests: ["tests/AndroidManifest.xml"],
351 srcs: [
352 "tests/src/**/*.kt",
353 "tests/src/**/*.java",
354 "src/**/*.kt",
355 "src/**/*.java",
356 "src/**/I*.aidl",
357 ":ReleaseJavaFiles",
David Saffb2319612023-10-19 14:14:16 -0400358 ":SystemUI-tests-multivalent",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000359 ":SystemUI-tests-utils",
360 ],
361 static_libs: [
362 "SystemUI-tests-base",
363 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400364 "androidx.core_core-animation-testing",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000365 "mockito-target-extended-minus-junit4",
366 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000367 "androidx.test.ext.truth",
Colin Cross852cd142023-08-11 16:53:55 -0700368 "kotlin-test",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100369 "SystemUICustomizationTestUtils",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000370 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400371 libs: [
372 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400373 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200374 "android.test.mock",
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200375 "keepanno-annotations",
Jason Monkae7ced22018-08-22 16:56:58 -0400376 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700377 kotlincflags: ["-Xjvm-default=all"],
Jason Monkae7ced22018-08-22 16:56:58 -0400378 aaptflags: [
379 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700380 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400381 ],
Coco Duand8ef1812023-10-19 21:35:01 +0000382 plugins: [
383 "androidx.room_room-compiler-plugin",
384 "dagger2-compiler",
385 ],
Cole Faust17f1e722022-08-16 15:30:26 -0700386 lint: {
387 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700388 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700389 },
Jason Monkae7ced22018-08-22 16:56:58 -0400390}
391
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000392android_app {
393 name: "SystemUIRobo-stub",
Jeff Sharkey0b319172024-01-25 10:58:48 -0700394 // SystemUiRavenTests references the .aapt.srcjar
395 use_resource_processor: false,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000396 defaults: [
397 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800398 "SystemUI_optimized_defaults",
Kevin Liud3793232023-02-09 20:37:27 +0000399 "SystemUI_compose_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000400 ],
401 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000402
403 srcs: [
404 "src/**/*.kt",
405 "src/**/*.java",
406 "src/**/I*.aidl",
407 ":ReleaseJavaFiles",
408 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000409 static_libs: [
410 "SystemUI-tests-base",
411 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200412 libs: [
413 "keepanno-annotations",
414 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000415 aaptflags: [
416 "--extra-packages",
417 "com.android.systemui",
418 ],
419 dont_merge_manifests: true,
420 platform_apis: true,
421 system_ext_specific: true,
422 certificate: "platform",
423 privileged: true,
424 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000425 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000426 optimize: {
427 shrink_resources: false,
428 proguard_flags_files: ["proguard.flags"],
429 },
Kevin Liud3793232023-02-09 20:37:27 +0000430
431 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000432}
433
434android_robolectric_test {
435 name: "SystemUiRoboTests",
436 srcs: [
437 "tests/robolectric/src/**/*.kt",
438 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000439 ":SystemUI-tests-utils",
David Saffb2319612023-10-19 14:14:16 -0400440 ":SystemUI-tests-multivalent",
Kevin Liud3793232023-02-09 20:37:27 +0000441 ],
442 static_libs: [
Beverly7c6fc662023-11-16 17:33:35 +0000443 "dagger2",
Kevin Liud3793232023-02-09 20:37:27 +0000444 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400445 "androidx.core_core-animation-testing",
Kevin Liud3793232023-02-09 20:37:27 +0000446 "androidx.test.ext.junit",
447 "inline-mockito-robolectric-prebuilt",
Jeff DeCew52c6a8b2023-12-21 19:21:03 +0000448 "platform-parametric-runner-lib",
Ioana Alexandru47ddbb72023-12-15 21:24:47 +0100449 "SystemUICustomizationTestUtils",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000450 ],
451 libs: [
452 "android.test.runner",
453 "android.test.base",
454 "android.test.mock",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000455 "truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000456 ],
Kevin Liud3793232023-02-09 20:37:27 +0000457
458 upstream: true,
459
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000460 instrumentation_for: "SystemUIRobo-stub",
461 java_resource_dirs: ["tests/robolectric/config"],
Beverly56039f52023-11-13 21:56:33 +0000462 plugins: [
463 "dagger2-compiler",
464 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000465}
466
Jeff Sharkey0b319172024-01-25 10:58:48 -0700467android_ravenwood_test {
468 name: "SystemUiRavenTests",
469 srcs: [
470 ":SystemUI-tests-utils",
471 ":SystemUI-tests-multivalent",
472 // TODO(b/294256649): pivot to using {.aapt.jar} and re-enable
473 // use_resource_processor: true when better supported by soong
474 ":SystemUIRobo-stub{.aapt.srcjar}",
475 ],
476 static_libs: [
477 "SystemUI-core",
478 "SystemUI-res",
479 "SystemUI-tests-base",
480 "androidx.test.uiautomator_uiautomator",
481 "androidx.core_core-animation-testing",
482 "androidx.test.ext.junit",
483 ],
484 libs: [
485 "android.test.runner",
486 "android.test.base",
487 "android.test.mock",
488 ],
489 auto_gen_config: true,
490 plugins: [
491 "dagger2-compiler",
492 ],
493}
494
Jared Duke84e94b32022-08-05 13:46:38 -0700495// Opt-out config for optimizing the SystemUI target using R8.
496// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
497// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800498soong_config_module_type {
499 name: "systemui_optimized_java_defaults",
500 module_type: "java_defaults",
501 config_namespace: "ANDROID",
502 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
503 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700504}
505
Jared Duke9dfa77b2021-12-22 13:31:06 -0800506systemui_optimized_java_defaults {
Jared Duke5bf6fb32023-02-23 14:27:47 -0800507 name: "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700508 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800509 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700510 optimize: {
511 enabled: true,
512 optimize: true,
513 shrink: true,
Jared Duke0668af22023-02-23 14:43:31 -0800514 shrink_resources: true,
Jared Duke5ecfe872022-09-08 09:25:30 -0700515 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000516 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700517 },
518 conditions_default: {
519 optimize: {
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 },
524 },
525 },
526}
527
Jason Monka2f2d822018-08-13 11:10:48 -0400528android_app {
529 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700530 defaults: [
531 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800532 "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700533 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400534 static_libs: [
535 "SystemUI-core",
536 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000537 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400538
Colin Crossc23cde42023-06-21 11:22:11 -0700539 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400540 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900541 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400542 certificate: "platform",
543 privileged: true,
544
Colin Cross6954ea72023-07-18 10:52:21 -0700545 kotlincflags: ["-Xjvm-default=all"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700546
Jason Monka2f2d822018-08-13 11:10:48 -0400547 dxflags: ["--multi-dex"],
Jared Duke5bf6fb32023-02-23 14:27:47 -0800548 optimize: {
549 proguard_flags_files: ["proguard.flags"],
550 },
Winson Chungb754f522020-08-03 22:17:08 -0700551 required: [
552 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700553 "wmshell.protolog.json.gz",
Pablo Gamito5fe2c802024-02-12 12:48:48 +0000554 "wmshell.protolog.pb",
Winson Chungb754f522020-08-03 22:17:08 -0700555 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400556}