blob: c2c5e001a5df90d9bb16ae4b53d1cb4570902c1d [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 {
18 default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
19}
20
21// Added automatically by a large-scale-change
22// See: http://go/android-license-faq
23license {
24 name: "frameworks_base_packages_SystemUI_license",
25 visibility: [":__subpackages__"],
26 license_kinds: [
27 "SPDX-license-identifier-Apache-2.0",
28 ],
29 license_text: [
30 "NOTICE",
31 ],
32}
33
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010034// Opt-in configuration for code depending on Jetpack Compose.
35soong_config_module_type {
36 name: "systemui_compose_java_defaults",
37 module_type: "java_defaults",
38 config_namespace: "ANDROID",
39 bool_variables: ["SYSTEMUI_USE_COMPOSE"],
40 properties: [
41 "srcs",
42 "static_libs",
43 ],
44}
45
46systemui_compose_java_defaults {
47 name: "SystemUI_compose_defaults",
48 soong_config_variables: {
49 SYSTEMUI_USE_COMPOSE: {
50 // Because files in compose/features/ depend on SystemUI
51 // code, we compile those files when compiling SystemUI-core.
52 // We also compile the ComposeFacade in
53 // compose/facade/enabled/.
54 srcs: [
55 "compose/features/src/**/*.kt",
56 "compose/facade/enabled/src/**/*.kt",
57 ],
58
59 // The dependencies needed by SystemUIComposeFeatures,
60 // except for SystemUI-core.
61 // Copied from compose/features/Android.bp.
62 static_libs: [
Jordan Demeulenaere8a1747d2022-12-28 11:11:42 +010063 "PlatformComposeCore",
Jordan Demeulenaere6d5bea52023-10-12 14:12:00 +020064 "PlatformComposeSceneTransitionLayout",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010065
66 "androidx.compose.runtime_runtime",
67 "androidx.compose.material3_material3",
Jordan Demeulenaerebf43b1d2022-12-16 13:00:23 +010068 "androidx.activity_activity-compose",
Jordan Demeulenaere0bbebad2023-07-06 10:19:49 +020069 "androidx.compose.animation_animation-graphics",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +010070 ],
71
72 // By default, Compose is disabled and we compile the ComposeFacade
73 // in compose/facade/disabled/.
74 conditions_default: {
75 srcs: ["compose/facade/disabled/src/**/*.kt"],
76 static_libs: [],
77 },
78 },
79 },
80}
81
Jason Monka2f2d822018-08-13 11:10:48 -040082java_library {
83 name: "SystemUI-proto",
84
85 srcs: ["src/**/*.proto"],
86
87 proto: {
88 type: "nano",
89 },
Winson Chungeb1aa3d2020-08-25 19:02:29 -070090
91 libs: [
92 "WindowManager-Shell-proto",
93 ],
Jason Monka2f2d822018-08-13 11:10:48 -040094}
95
96java_library {
97 name: "SystemUI-tags",
98 srcs: ["src/com/android/systemui/EventLogTags.logtags"],
99}
100
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400101filegroup {
102 name: "ReleaseJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400103 srcs: [
104 "src-release/**/*.kt",
105 "src-release/**/*.java",
106 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400107}
108
109filegroup {
110 name: "DebugJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400111 srcs: [
112 "src-debug/**/*.kt",
113 "src-debug/**/*.java",
114 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400115}
116
Xiaozhen Lin53063042022-11-23 02:18:08 +0000117//Create a library to expose SystemUI's resources to other modules.
118android_library {
119 name: "SystemUI-res",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700120 use_resource_processor: true,
Xiaozhen Lin53063042022-11-23 02:18:08 +0000121 resource_dirs: [
122 "res-product",
123 "res-keyguard",
124 "res",
125 ],
126 static_libs: [
127 "SystemUISharedLib",
Hawkwood Glazier057df3a2023-06-14 20:10:21 +0000128 "SystemUICustomizationLib",
Xiaozhen Lin53063042022-11-23 02:18:08 +0000129 "SettingsLib",
130 "androidx.leanback_leanback",
131 "androidx.slice_slice-core",
132 "androidx.slice_slice-view",
133 ],
134 manifest: "AndroidManifest-res.xml",
135}
136
Jason Monka2f2d822018-08-13 11:10:48 -0400137android_library {
138 name: "SystemUI-core",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100139 defaults: [
140 "SystemUI_compose_defaults",
141 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400142 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -0400143 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -0400144 "src/**/*.java",
145 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -0400146 ":ReleaseJavaFiles",
Jason Monka2f2d822018-08-13 11:10:48 -0400147 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400148 product_variables: {
149 debuggable: {
150 srcs: [":DebugJavaFiles"],
151 exclude_srcs: [":ReleaseJavaFiles"],
152 },
153 },
Colin Crossc23cde42023-06-21 11:22:11 -0700154 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400155 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700156 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700157 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800158 "WindowManager-Shell",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200159 "SystemUIAnimationLib",
Darrell Shi60006322023-04-06 17:58:40 +0000160 "SystemUICommon",
161 "SystemUICustomizationLib",
Darrell Shi1a21b362023-04-28 19:51:44 +0000162 "SystemUILogLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400163 "SystemUIPluginLib",
164 "SystemUISharedLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800165 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400166 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400167 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000168 "com_android_systemui_shared_flags_lib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700169 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500170 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400171 "androidx.legacy_legacy-support-v4",
172 "androidx.recyclerview_recyclerview",
173 "androidx.preference_preference",
174 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500175 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400176 "androidx.mediarouter_mediarouter",
177 "androidx.palette_palette",
178 "androidx.legacy_legacy-preference-v14",
179 "androidx.leanback_leanback",
180 "androidx.slice_slice-core",
181 "androidx.slice_slice-view",
182 "androidx.slice_slice-builders",
183 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800184 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400185 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200186 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800187 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400188 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500189 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000190 "androidx.room_room-runtime",
191 "androidx.room_room-ktx",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800192 "com.google.android.material_material",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000193 "device_state_flags_lib",
Steve Elliotta7d72052020-12-16 23:04:19 -0500194 "kotlinx_coroutines_android",
195 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800196 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400197 "SystemUI-tags",
198 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000199 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700200 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400201 "dagger2",
Brett Chabotfc8675a2023-03-27 10:33:10 -0700202 "jsr305",
Andy Wickham64e34102021-03-07 16:02:01 -0800203 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400204 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400205 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000206 "motion_tool_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400207 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200208 libs: [
209 "keepanno-annotations",
210 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400211 manifest: "AndroidManifest.xml",
212
Coco Duand8ef1812023-10-19 21:35:01 +0000213 javacflags: [
214 "-Adagger.fastInit=enabled",
215 "-Aroom.schemaLocation=frameworks/base/packages/SystemUI/schemas",
216 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700217 kotlincflags: ["-Xjvm-default=all"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500218
Coco Duand8ef1812023-10-19 21:35:01 +0000219 plugins: [
220 "androidx.room_room-compiler-plugin",
221 "dagger2-compiler",
222 ],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000223
224 lint: {
225 extra_check_modules: ["SystemUILintChecker"],
Michal Brzezinskid552d1f2023-09-29 15:00:19 +0100226 warning_checks: ["MissingApacheLicenseDetector"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000227 },
Jason Monka2f2d822018-08-13 11:10:48 -0400228}
229
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900230filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500231 name: "AAA-src",
232 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
233 path: "tests/src",
234}
235
236filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900237 name: "SystemUI-tests-utils",
238 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200239 "tests/utils/src/**/*.java",
240 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400241 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200242 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900243}
244
Kevin Liud3793232023-02-09 20:37:27 +0000245filegroup {
David Saffb2319612023-10-19 14:14:16 -0400246 name: "SystemUI-tests-multivalent",
247 srcs: [
248 "multivalentTests/src/**/*.kt",
Rex Hoffman1477e0f2023-11-28 17:18:28 +0000249 "multivalentTests/src/**/*.java",
David Saffb2319612023-10-19 14:14:16 -0400250 ],
251 path: "multivalentTests/src",
252}
253
Bryce Leea5b08082021-10-06 11:34:56 -0700254java_library {
255 name: "SystemUI-tests-concurrency",
256 srcs: [
257 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
258 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200259 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
260 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700261 ],
262 jarjar_rules: ":jarjar-rules-shared",
263}
264
Jason Monkae7ced22018-08-22 16:56:58 -0400265android_library {
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000266 name: "SystemUI-tests-base",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700267 use_resource_processor: true,
Sunny Goyaleb18d392020-02-07 16:48:14 -0800268 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400269 resource_dirs: [
270 "tests/res",
Jason Monkae7ced22018-08-22 16:56:58 -0400271 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400272 static_libs: [
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700273 "SystemUI-res",
Quang Luongc6fc5b22021-06-10 14:35:32 -0700274 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200275 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400276 "SystemUIPluginLib",
277 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000278 "SystemUICustomizationLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700279 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400280 "SettingsLib",
Ned Burns6d480c32023-08-28 12:12:19 -0400281 "com_android_systemui_flags_lib",
Dave Mankoff2ea6f6d2023-11-01 16:08:15 +0000282 "com_android_systemui_shared_flags_lib",
Jeff DeCew91a53962023-10-06 15:40:23 +0000283 "flag-junit-base",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500284 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400285 "androidx.legacy_legacy-support-v4",
286 "androidx.recyclerview_recyclerview",
287 "androidx.preference_preference",
288 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500289 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400290 "androidx.mediarouter_mediarouter",
291 "androidx.palette_palette",
292 "androidx.legacy_legacy-preference-v14",
293 "androidx.leanback_leanback",
294 "androidx.slice_slice-core",
295 "androidx.slice_slice-view",
296 "androidx.slice_slice-builders",
297 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800298 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400299 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200300 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800301 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400302 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500303 "androidx.exifinterface_exifinterface",
Coco Duand8ef1812023-10-19 21:35:01 +0000304 "androidx.room_room-runtime",
305 "androidx.room_room-ktx",
Nicolo' Mazzucatoadc02502023-11-30 16:09:19 +0000306 "device_state_flags_lib",
Pinyao Tingee191b12020-04-29 18:35:39 -0700307 "kotlinx-coroutines-android",
308 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700309 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000310 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700311 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400312 "SystemUI-tags",
313 "SystemUI-proto",
314 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900315 "hamcrest-library",
316 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400317 "testables",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000318 "truth",
Lucas Dupine37369f2021-08-31 00:19:39 +0000319 "monet",
Lucas Dupind83b4ee2023-07-08 11:05:47 -0700320 "libmonet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400321 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800322 "jsr330",
323 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400324 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000325 "motion_tool_lib",
Johannes Gallmannb642af92022-10-14 09:58:09 +0000326 "androidx.core_core-animation-testing-nodeps",
Jordan Demeulenaere54a0fae2023-01-04 11:36:46 +0100327 "androidx.compose.ui_ui",
Riley Jones84156fc2023-09-06 22:27:37 +0000328 "flag-junit",
329 "platform-test-annotations",
Jason Monkae7ced22018-08-22 16:56:58 -0400330 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000331}
332
333android_library {
334 name: "SystemUI-tests",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700335 use_resource_processor: true,
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100336 defaults: [
337 "SystemUI_compose_defaults",
338 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000339 manifest: "tests/AndroidManifest-base.xml",
340 additional_manifests: ["tests/AndroidManifest.xml"],
341 srcs: [
342 "tests/src/**/*.kt",
343 "tests/src/**/*.java",
344 "src/**/*.kt",
345 "src/**/*.java",
346 "src/**/I*.aidl",
347 ":ReleaseJavaFiles",
David Saffb2319612023-10-19 14:14:16 -0400348 ":SystemUI-tests-multivalent",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000349 ":SystemUI-tests-utils",
350 ],
351 static_libs: [
352 "SystemUI-tests-base",
353 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400354 "androidx.core_core-animation-testing",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000355 "mockito-target-extended-minus-junit4",
356 "androidx.test.ext.junit",
Steven Ng45b74c62023-03-23 11:23:02 +0000357 "androidx.test.ext.truth",
Colin Cross852cd142023-08-11 16:53:55 -0700358 "kotlin-test",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000359 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400360 libs: [
361 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400362 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200363 "android.test.mock",
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200364 "keepanno-annotations",
Jason Monkae7ced22018-08-22 16:56:58 -0400365 ],
Colin Cross6954ea72023-07-18 10:52:21 -0700366 kotlincflags: ["-Xjvm-default=all"],
Jason Monkae7ced22018-08-22 16:56:58 -0400367 aaptflags: [
368 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700369 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400370 ],
Coco Duand8ef1812023-10-19 21:35:01 +0000371 plugins: [
372 "androidx.room_room-compiler-plugin",
373 "dagger2-compiler",
374 ],
Cole Faust17f1e722022-08-16 15:30:26 -0700375 lint: {
376 test: true,
Jeff Chen194a13f2023-03-16 15:40:05 -0700377 extra_check_modules: ["SystemUILintChecker"],
Cole Faust17f1e722022-08-16 15:30:26 -0700378 },
Jason Monkae7ced22018-08-22 16:56:58 -0400379}
380
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000381android_app {
382 name: "SystemUIRobo-stub",
Peter Kalauskas84c5a992023-08-23 13:39:23 -0700383 use_resource_processor: true,
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000384 defaults: [
385 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800386 "SystemUI_optimized_defaults",
Kevin Liud3793232023-02-09 20:37:27 +0000387 "SystemUI_compose_defaults",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000388 ],
389 manifest: "tests/AndroidManifest-base.xml",
Kevin Liud3793232023-02-09 20:37:27 +0000390
391 srcs: [
392 "src/**/*.kt",
393 "src/**/*.java",
394 "src/**/I*.aidl",
395 ":ReleaseJavaFiles",
396 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000397 static_libs: [
398 "SystemUI-tests-base",
399 ],
Nikolas Havrikovc70cb072023-09-08 15:06:35 +0200400 libs: [
401 "keepanno-annotations",
402 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000403 aaptflags: [
404 "--extra-packages",
405 "com.android.systemui",
406 ],
407 dont_merge_manifests: true,
408 platform_apis: true,
409 system_ext_specific: true,
410 certificate: "platform",
411 privileged: true,
412 resource_dirs: [],
Kevin Liud3793232023-02-09 20:37:27 +0000413 kotlincflags: ["-Xjvm-default=all"],
Kevin Liu092b8212023-02-15 05:42:34 +0000414 optimize: {
415 shrink_resources: false,
416 proguard_flags_files: ["proguard.flags"],
417 },
Kevin Liud3793232023-02-09 20:37:27 +0000418
419 plugins: ["dagger2-compiler"],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000420}
421
422android_robolectric_test {
423 name: "SystemUiRoboTests",
424 srcs: [
425 "tests/robolectric/src/**/*.kt",
426 "tests/robolectric/src/**/*.java",
Kevin Liud3793232023-02-09 20:37:27 +0000427 ":SystemUI-tests-utils",
David Saffb2319612023-10-19 14:14:16 -0400428 ":SystemUI-tests-multivalent",
Kevin Liud3793232023-02-09 20:37:27 +0000429 ],
430 static_libs: [
Beverly7c6fc662023-11-16 17:33:35 +0000431 "dagger2",
Kevin Liud3793232023-02-09 20:37:27 +0000432 "androidx.test.uiautomator_uiautomator",
Jeff DeCewa415d0e2023-08-02 11:30:09 -0400433 "androidx.core_core-animation-testing",
Kevin Liud3793232023-02-09 20:37:27 +0000434 "androidx.test.ext.junit",
435 "inline-mockito-robolectric-prebuilt",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000436 ],
437 libs: [
438 "android.test.runner",
439 "android.test.base",
440 "android.test.mock",
Krzysztof KosiƄski60b70872023-10-06 20:11:39 +0000441 "truth",
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000442 ],
Kevin Liud3793232023-02-09 20:37:27 +0000443
444 upstream: true,
445
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000446 instrumentation_for: "SystemUIRobo-stub",
447 java_resource_dirs: ["tests/robolectric/config"],
Beverly56039f52023-11-13 21:56:33 +0000448 plugins: [
449 "dagger2-compiler",
450 ],
Jay Aliomer9b13ae12022-11-28 14:50:09 +0000451}
452
Jared Duke84e94b32022-08-05 13:46:38 -0700453// Opt-out config for optimizing the SystemUI target using R8.
454// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
455// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800456soong_config_module_type {
457 name: "systemui_optimized_java_defaults",
458 module_type: "java_defaults",
459 config_namespace: "ANDROID",
460 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
461 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700462}
463
Jared Duke9dfa77b2021-12-22 13:31:06 -0800464systemui_optimized_java_defaults {
Jared Duke5bf6fb32023-02-23 14:27:47 -0800465 name: "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700466 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800467 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700468 optimize: {
469 enabled: true,
470 optimize: true,
471 shrink: true,
Jared Duke0668af22023-02-23 14:43:31 -0800472 shrink_resources: true,
Jared Duke5ecfe872022-09-08 09:25:30 -0700473 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000474 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700475 },
476 conditions_default: {
477 optimize: {
Jared Duke5ecfe872022-09-08 09:25:30 -0700478 ignore_warnings: false,
Jared Dukef0904172022-06-07 18:01:06 +0000479 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700480 },
481 },
482 },
483 },
484}
485
Jason Monka2f2d822018-08-13 11:10:48 -0400486android_app {
487 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700488 defaults: [
489 "platform_app_defaults",
Jared Duke5bf6fb32023-02-23 14:27:47 -0800490 "SystemUI_optimized_defaults",
Jared Duke2fee7402021-10-18 14:35:04 -0700491 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400492 static_libs: [
493 "SystemUI-core",
494 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000495 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400496
Colin Crossc23cde42023-06-21 11:22:11 -0700497 use_resource_processor: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400498 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900499 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400500 certificate: "platform",
501 privileged: true,
502
Colin Cross6954ea72023-07-18 10:52:21 -0700503 kotlincflags: ["-Xjvm-default=all"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700504
Jason Monka2f2d822018-08-13 11:10:48 -0400505 dxflags: ["--multi-dex"],
Jared Duke5bf6fb32023-02-23 14:27:47 -0800506 optimize: {
507 proguard_flags_files: ["proguard.flags"],
508 },
Winson Chungb754f522020-08-03 22:17:08 -0700509 required: [
510 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700511 "wmshell.protolog.json.gz",
Winson Chungb754f522020-08-03 22:17:08 -0700512 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400513}