blob: 9515aa5d3f53c761bce8f664df94ca4b9b89710a [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: [
63 "SystemUIComposeCore",
64
65 "androidx.compose.runtime_runtime",
66 "androidx.compose.material3_material3",
67 ],
68
69 // By default, Compose is disabled and we compile the ComposeFacade
70 // in compose/facade/disabled/.
71 conditions_default: {
72 srcs: ["compose/facade/disabled/src/**/*.kt"],
73 static_libs: [],
74 },
75 },
76 },
77}
78
Jason Monka2f2d822018-08-13 11:10:48 -040079java_library {
80 name: "SystemUI-proto",
81
82 srcs: ["src/**/*.proto"],
83
84 proto: {
85 type: "nano",
86 },
Winson Chungeb1aa3d2020-08-25 19:02:29 -070087
88 libs: [
89 "WindowManager-Shell-proto",
90 ],
Jason Monka2f2d822018-08-13 11:10:48 -040091}
92
93java_library {
94 name: "SystemUI-tags",
95 srcs: ["src/com/android/systemui/EventLogTags.logtags"],
96}
97
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040098filegroup {
99 name: "ReleaseJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400100 srcs: [
101 "src-release/**/*.kt",
102 "src-release/**/*.java",
103 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400104}
105
106filegroup {
107 name: "DebugJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -0400108 srcs: [
109 "src-debug/**/*.kt",
110 "src-debug/**/*.java",
111 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400112}
113
Jason Monka2f2d822018-08-13 11:10:48 -0400114android_library {
115 name: "SystemUI-core",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100116 defaults: [
117 "SystemUI_compose_defaults",
118 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400119 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -0400120 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -0400121 "src/**/*.java",
122 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -0400123 ":ReleaseJavaFiles",
Jason Monka2f2d822018-08-13 11:10:48 -0400124 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -0400125 product_variables: {
126 debuggable: {
127 srcs: [":DebugJavaFiles"],
128 exclude_srcs: [":ReleaseJavaFiles"],
129 },
130 },
Jason Monka2f2d822018-08-13 11:10:48 -0400131 resource_dirs: [
Sunny Goyalb4a26012019-12-05 15:49:41 -0800132 "res-product",
Jason Monka2f2d822018-08-13 11:10:48 -0400133 "res-keyguard",
134 "res",
135 ],
136 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700137 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800138 "WindowManager-Shell",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200139 "SystemUIAnimationLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400140 "SystemUIPluginLib",
141 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000142 "SystemUICustomizationLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800143 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400144 "SettingsLib",
Alejandro Nijamkin6f22abf62022-06-27 14:18:17 -0700145 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500146 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400147 "androidx.legacy_legacy-support-v4",
148 "androidx.recyclerview_recyclerview",
149 "androidx.preference_preference",
150 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500151 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400152 "androidx.mediarouter_mediarouter",
153 "androidx.palette_palette",
154 "androidx.legacy_legacy-preference-v14",
155 "androidx.leanback_leanback",
156 "androidx.slice_slice-core",
157 "androidx.slice_slice-view",
158 "androidx.slice_slice-builders",
159 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800160 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400161 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200162 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800163 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400164 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500165 "androidx.exifinterface_exifinterface",
Rahul Banerjee326c2502022-11-01 11:54:45 -0700166 "androidx.test.ext.junit",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800167 "com.google.android.material_material",
Steve Elliotta7d72052020-12-16 23:04:19 -0500168 "kotlinx_coroutines_android",
169 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800170 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400171 "SystemUI-tags",
172 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000173 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400174 "dagger2",
Andy Wickham64e34102021-03-07 16:02:01 -0800175 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400176 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400177 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000178 "motion_tool_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400179 ],
180 manifest: "AndroidManifest.xml",
181
Selim Cinek820ba2d2019-06-18 18:59:09 -0700182 kotlincflags: ["-Xjvm-default=enable"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500183
Dave Mankoffdffcc472020-07-08 15:25:16 -0400184 plugins: ["dagger2-compiler"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000185
186 lint: {
187 extra_check_modules: ["SystemUILintChecker"],
188 },
Jason Monka2f2d822018-08-13 11:10:48 -0400189}
190
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900191filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500192 name: "AAA-src",
193 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
194 path: "tests/src",
195}
196
197filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900198 name: "SystemUI-tests-utils",
199 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200200 "tests/utils/src/**/*.java",
201 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400202 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200203 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900204}
205
Bryce Leea5b08082021-10-06 11:34:56 -0700206java_library {
207 name: "SystemUI-tests-concurrency",
208 srcs: [
209 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
210 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200211 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
212 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700213 ],
214 jarjar_rules: ":jarjar-rules-shared",
215}
216
Jason Monkae7ced22018-08-22 16:56:58 -0400217android_library {
Jay Aliomera22acac2022-11-28 14:50:09 +0000218 name: "SystemUI-tests-base",
Sunny Goyaleb18d392020-02-07 16:48:14 -0800219 manifest: "tests/AndroidManifest-base.xml",
Jason Monkae7ced22018-08-22 16:56:58 -0400220 resource_dirs: [
221 "tests/res",
Sunny Goyalb4a26012019-12-05 15:49:41 -0800222 "res-product",
Jason Monkae7ced22018-08-22 16:56:58 -0400223 "res-keyguard",
224 "res",
225 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400226 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700227 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200228 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400229 "SystemUIPluginLib",
230 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000231 "SystemUICustomizationLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700232 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400233 "SettingsLib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500234 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400235 "androidx.legacy_legacy-support-v4",
236 "androidx.recyclerview_recyclerview",
237 "androidx.preference_preference",
238 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500239 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400240 "androidx.mediarouter_mediarouter",
241 "androidx.palette_palette",
242 "androidx.legacy_legacy-preference-v14",
243 "androidx.leanback_leanback",
244 "androidx.slice_slice-core",
245 "androidx.slice_slice-view",
246 "androidx.slice_slice-builders",
247 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800248 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400249 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200250 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800251 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400252 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500253 "androidx.exifinterface_exifinterface",
Pinyao Tingee191b12020-04-29 18:35:39 -0700254 "kotlinx-coroutines-android",
255 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700256 "kotlinx_coroutines_test",
Chandru917e4bc2022-08-19 14:25:31 +0000257 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700258 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400259 "SystemUI-tags",
260 "SystemUI-proto",
261 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900262 "hamcrest-library",
263 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400264 "testables",
265 "truth-prebuilt",
Lucas Dupine37369f2021-08-31 00:19:39 +0000266 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400267 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800268 "jsr330",
269 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400270 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000271 "motion_tool_lib",
Johannes Gallmannb642af92022-10-14 09:58:09 +0000272 "androidx.core_core-animation-testing-nodeps",
Jason Monkae7ced22018-08-22 16:56:58 -0400273 ],
Jay Aliomera22acac2022-11-28 14:50:09 +0000274}
275
276android_library {
277 name: "SystemUI-tests",
Jordan Demeulenaere68e91822022-12-16 10:55:47 +0100278 defaults: [
279 "SystemUI_compose_defaults",
280 ],
Jay Aliomera22acac2022-11-28 14:50:09 +0000281 manifest: "tests/AndroidManifest-base.xml",
282 additional_manifests: ["tests/AndroidManifest.xml"],
283 srcs: [
284 "tests/src/**/*.kt",
285 "tests/src/**/*.java",
286 "src/**/*.kt",
287 "src/**/*.java",
288 "src/**/I*.aidl",
289 ":ReleaseJavaFiles",
290 ":SystemUI-tests-utils",
291 ],
292 static_libs: [
293 "SystemUI-tests-base",
294 "androidx.test.uiautomator",
295 "mockito-target-extended-minus-junit4",
296 "androidx.test.ext.junit",
297 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400298 libs: [
299 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400300 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200301 "android.test.mock",
Jason Monkae7ced22018-08-22 16:56:58 -0400302 ],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700303 kotlincflags: ["-Xjvm-default=enable"],
Jason Monkae7ced22018-08-22 16:56:58 -0400304 aaptflags: [
305 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700306 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400307 ],
Dave Mankoffdffcc472020-07-08 15:25:16 -0400308 plugins: ["dagger2-compiler"],
Jason Monkae7ced22018-08-22 16:56:58 -0400309}
310
Jay Aliomera22acac2022-11-28 14:50:09 +0000311android_app {
312 name: "SystemUIRobo-stub",
313 defaults: [
314 "platform_app_defaults",
315 "SystemUI_app_defaults",
316 ],
317 manifest: "tests/AndroidManifest-base.xml",
318 static_libs: [
319 "SystemUI-tests-base",
320 ],
321 aaptflags: [
322 "--extra-packages",
323 "com.android.systemui",
324 ],
325 dont_merge_manifests: true,
326 platform_apis: true,
327 system_ext_specific: true,
328 certificate: "platform",
329 privileged: true,
330 resource_dirs: [],
331}
332
333android_robolectric_test {
334 name: "SystemUiRoboTests",
335 srcs: [
336 "tests/robolectric/src/**/*.kt",
337 "tests/robolectric/src/**/*.java",
338 ],
339 libs: [
340 "android.test.runner",
341 "android.test.base",
342 "android.test.mock",
343 "truth-prebuilt",
344 ],
345 kotlincflags: ["-Xjvm-default=enable"],
346 instrumentation_for: "SystemUIRobo-stub",
347 java_resource_dirs: ["tests/robolectric/config"],
348}
349
Jared Duke84e94b32022-08-05 13:46:38 -0700350// Opt-out config for optimizing the SystemUI target using R8.
351// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
352// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800353soong_config_module_type {
354 name: "systemui_optimized_java_defaults",
355 module_type: "java_defaults",
356 config_namespace: "ANDROID",
357 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
358 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700359}
360
Jared Duke9dfa77b2021-12-22 13:31:06 -0800361systemui_optimized_java_defaults {
Jared Duke2fee7402021-10-18 14:35:04 -0700362 name: "SystemUI_app_defaults",
363 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800364 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700365 optimize: {
366 enabled: true,
367 optimize: true,
368 shrink: true,
369 proguard_flags_files: ["proguard.flags"],
370 },
371 conditions_default: {
372 optimize: {
373 proguard_flags_files: ["proguard.flags"],
374 },
375 },
376 },
377 },
378}
379
Jason Monka2f2d822018-08-13 11:10:48 -0400380android_app {
381 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700382 defaults: [
383 "platform_app_defaults",
384 "SystemUI_app_defaults",
385 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400386 static_libs: [
387 "SystemUI-core",
388 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000389 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400390
391 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900392 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400393 certificate: "platform",
394 privileged: true,
395
Selim Cinek820ba2d2019-06-18 18:59:09 -0700396 kotlincflags: ["-Xjvm-default=enable"],
397
Jason Monka2f2d822018-08-13 11:10:48 -0400398 dxflags: ["--multi-dex"],
Winson Chungb754f522020-08-03 22:17:08 -0700399 required: [
400 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700401 "wmshell.protolog.json.gz",
Winson Chungb754f522020-08-03 22:17:08 -0700402 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400403}