blob: f1cef7a67f5a2b11a60b0b2a9d0bb1dc77a67764 [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
Jason Monka2f2d822018-08-13 11:10:48 -040034java_library {
35 name: "SystemUI-proto",
36
37 srcs: ["src/**/*.proto"],
38
39 proto: {
40 type: "nano",
41 },
Winson Chungeb1aa3d2020-08-25 19:02:29 -070042
43 libs: [
44 "WindowManager-Shell-proto",
45 ],
Jason Monka2f2d822018-08-13 11:10:48 -040046}
47
48java_library {
49 name: "SystemUI-tags",
50 srcs: ["src/com/android/systemui/EventLogTags.logtags"],
51}
52
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040053filegroup {
54 name: "ReleaseJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -040055 srcs: [
56 "src-release/**/*.kt",
57 "src-release/**/*.java",
58 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040059}
60
61filegroup {
62 name: "DebugJavaFiles",
Jeff DeCew86b8e772021-10-25 20:35:45 -040063 srcs: [
64 "src-debug/**/*.kt",
65 "src-debug/**/*.java",
66 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040067}
68
Jason Monka2f2d822018-08-13 11:10:48 -040069android_library {
70 name: "SystemUI-core",
71 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -040072 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -040073 "src/**/*.java",
74 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -040075 ":ReleaseJavaFiles",
Jason Monka2f2d822018-08-13 11:10:48 -040076 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040077 product_variables: {
78 debuggable: {
79 srcs: [":DebugJavaFiles"],
80 exclude_srcs: [":ReleaseJavaFiles"],
81 },
82 },
Jason Monka2f2d822018-08-13 11:10:48 -040083 resource_dirs: [
Sunny Goyalb4a26012019-12-05 15:49:41 -080084 "res-product",
Jason Monka2f2d822018-08-13 11:10:48 -040085 "res-keyguard",
86 "res",
87 ],
88 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -070089 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -080090 "WindowManager-Shell",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +020091 "SystemUIAnimationLib",
Jason Monka2f2d822018-08-13 11:10:48 -040092 "SystemUIPluginLib",
93 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +000094 "SystemUICustomizationLib",
Jerry Chang919d1d22020-07-16 12:31:24 +080095 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -040096 "SettingsLib",
Alejandro Nijamkin6f22abf62022-06-27 14:18:17 -070097 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -050098 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -040099 "androidx.legacy_legacy-support-v4",
100 "androidx.recyclerview_recyclerview",
101 "androidx.preference_preference",
102 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500103 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400104 "androidx.mediarouter_mediarouter",
105 "androidx.palette_palette",
106 "androidx.legacy_legacy-preference-v14",
107 "androidx.leanback_leanback",
108 "androidx.slice_slice-core",
109 "androidx.slice_slice-view",
110 "androidx.slice_slice-builders",
111 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800112 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400113 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200114 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800115 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400116 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500117 "androidx.exifinterface_exifinterface",
Rahul Banerjee326c2502022-11-01 11:54:45 -0700118 "androidx.test.ext.junit",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800119 "com.google.android.material_material",
Steve Elliotta7d72052020-12-16 23:04:19 -0500120 "kotlinx_coroutines_android",
121 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800122 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400123 "SystemUI-tags",
124 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000125 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400126 "dagger2",
Andy Wickham64e34102021-03-07 16:02:01 -0800127 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400128 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400129 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000130 "motion_tool_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400131 ],
132 manifest: "AndroidManifest.xml",
133
Selim Cinek820ba2d2019-06-18 18:59:09 -0700134 kotlincflags: ["-Xjvm-default=enable"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500135
Dave Mankoffdffcc472020-07-08 15:25:16 -0400136 plugins: ["dagger2-compiler"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000137
138 lint: {
139 extra_check_modules: ["SystemUILintChecker"],
140 },
Jason Monka2f2d822018-08-13 11:10:48 -0400141}
142
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900143filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500144 name: "AAA-src",
145 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
146 path: "tests/src",
147}
148
149filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900150 name: "SystemUI-tests-utils",
151 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200152 "tests/utils/src/**/*.java",
153 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400154 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200155 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900156}
157
Bryce Leea5b08082021-10-06 11:34:56 -0700158java_library {
159 name: "SystemUI-tests-concurrency",
160 srcs: [
161 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
162 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200163 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
164 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700165 ],
166 jarjar_rules: ":jarjar-rules-shared",
167}
168
Jason Monkae7ced22018-08-22 16:56:58 -0400169android_library {
Jay Aliomerfac84d72022-11-03 14:07:41 +0000170 name: "SystemUI-tests-base",
Sunny Goyaleb18d392020-02-07 16:48:14 -0800171 manifest: "tests/AndroidManifest-base.xml",
Jay Aliomerfac84d72022-11-03 14:07:41 +0000172
Jason Monkae7ced22018-08-22 16:56:58 -0400173 resource_dirs: [
174 "tests/res",
Sunny Goyalb4a26012019-12-05 15:49:41 -0800175 "res-product",
Jason Monkae7ced22018-08-22 16:56:58 -0400176 "res-keyguard",
177 "res",
178 ],
Jason Monkae7ced22018-08-22 16:56:58 -0400179 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700180 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200181 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400182 "SystemUIPluginLib",
183 "SystemUISharedLib",
Hawkwood Glazierb8eef872022-11-11 17:56:14 +0000184 "SystemUICustomizationLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700185 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400186 "SettingsLib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500187 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400188 "androidx.legacy_legacy-support-v4",
189 "androidx.recyclerview_recyclerview",
190 "androidx.preference_preference",
191 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500192 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400193 "androidx.mediarouter_mediarouter",
194 "androidx.palette_palette",
195 "androidx.legacy_legacy-preference-v14",
196 "androidx.leanback_leanback",
197 "androidx.slice_slice-core",
198 "androidx.slice_slice-view",
199 "androidx.slice_slice-builders",
200 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800201 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400202 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200203 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800204 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400205 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500206 "androidx.exifinterface_exifinterface",
Pinyao Tingee191b12020-04-29 18:35:39 -0700207 "kotlinx-coroutines-android",
208 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700209 "kotlinx_coroutines_test",
Chandru917e4bc2022-08-19 14:25:31 +0000210 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700211 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400212 "SystemUI-tags",
213 "SystemUI-proto",
214 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900215 "hamcrest-library",
216 "androidx.test.rules",
Jason Monkae7ced22018-08-22 16:56:58 -0400217 "testables",
218 "truth-prebuilt",
Lucas Dupine37369f2021-08-31 00:19:39 +0000219 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400220 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800221 "jsr330",
222 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400223 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000224 "motion_tool_lib",
Jason Monkae7ced22018-08-22 16:56:58 -0400225 ],
226 libs: [
227 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400228 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200229 "android.test.mock",
Jason Monkae7ced22018-08-22 16:56:58 -0400230 ],
Jay Aliomerfac84d72022-11-03 14:07:41 +0000231}
232
233// Device tests only
234android_library {
235 name: "SystemUI-tests",
236 manifest: "tests/AndroidManifest.xml",
237 additional_manifests: ["tests/AndroidManifest.xml"],
238 resource_dirs: [],
239 srcs: [
240 // Kotlin likes all files in the same module for internal
241 "src/**/*.kt",
242 "src/**/*.java",
243 "src/**/I*.aidl",
244 ":ReleaseJavaFiles",
245 "tests/src/**/*.kt",
246 "tests/src/**/*.java",
247 ":SystemUI-tests-utils",
248 ],
249 dont_merge_manifests: true,
250 static_libs: [
251 "SystemUI-tests-base",
252 "androidx.test.uiautomator_uiautomator",
253 "mockito-target-extended-minus-junit4",
254 "androidx.test.ext.junit",
255 ],
256 libs: [
257 "android.test.runner",
258 "android.test.base",
259 "android.test.mock",
260 ],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700261 kotlincflags: ["-Xjvm-default=enable"],
Jason Monkae7ced22018-08-22 16:56:58 -0400262 aaptflags: [
263 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700264 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400265 ],
Dave Mankoffdffcc472020-07-08 15:25:16 -0400266 plugins: ["dagger2-compiler"],
Cole Faust17f1e722022-08-16 15:30:26 -0700267 lint: {
268 test: true,
269 },
Jason Monkae7ced22018-08-22 16:56:58 -0400270}
271
Jay Aliomerfac84d72022-11-03 14:07:41 +0000272android_app {
273 name: "SystemUIRobo-stub",
274 defaults: [
275 "platform_app_defaults",
276 "SystemUI_app_defaults",
277 ],
278 srcs: [
279 "src/**/*.kt",
280 "src/**/*.java",
281 "src/**/I*.aidl",
282 ":ReleaseJavaFiles",
283 ],
284 manifest: "tests/AndroidManifest-base.xml",
285 static_libs: [
286 "SystemUI-tests-base",
287 ],
288 aaptflags: [
289 "--extra-packages",
290 "com.android.systemui",
291 ],
292 dont_merge_manifests: true,
293 platform_apis: true,
294 system_ext_specific: true,
295 certificate: "platform",
296 privileged: true,
297 resource_dirs: [],
298
299 kotlincflags: ["-Xjvm-default=enable"],
300 dxflags: ["--multi-dex"],
301 required: [
302 "privapp_whitelist_com.android.systemui",
303 ],
304 plugins: ["dagger2-compiler"],
305}
306
307android_robolectric_test {
308 name: "SystemUiRoboTests",
309 srcs: [
310 "tests/robolectric/src/**/*.kt",
311 "tests/robolectric/src/**/*.java",
312 ],
313 libs: [
314 "android.test.runner",
315 "android.test.base",
316 "android.test.mock",
317 "truth-prebuilt",
318 ],
319 kotlincflags: ["-Xjvm-default=enable"],
320 instrumentation_for: "SystemUIRobo-stub",
321 java_resource_dirs: ["tests/robolectric/config"],
322}
323
Jared Duke84e94b32022-08-05 13:46:38 -0700324// Opt-out config for optimizing the SystemUI target using R8.
325// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
326// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800327soong_config_module_type {
328 name: "systemui_optimized_java_defaults",
329 module_type: "java_defaults",
330 config_namespace: "ANDROID",
331 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
332 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700333}
334
Jared Duke9dfa77b2021-12-22 13:31:06 -0800335systemui_optimized_java_defaults {
Jared Duke2fee7402021-10-18 14:35:04 -0700336 name: "SystemUI_app_defaults",
337 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800338 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700339 optimize: {
340 enabled: true,
341 optimize: true,
342 shrink: true,
343 proguard_flags_files: ["proguard.flags"],
344 },
345 conditions_default: {
346 optimize: {
347 proguard_flags_files: ["proguard.flags"],
348 },
349 },
350 },
351 },
352}
353
Jason Monka2f2d822018-08-13 11:10:48 -0400354android_app {
355 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700356 defaults: [
357 "platform_app_defaults",
358 "SystemUI_app_defaults",
359 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400360 static_libs: [
361 "SystemUI-core",
362 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000363 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400364
365 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900366 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400367 certificate: "platform",
368 privileged: true,
369
Selim Cinek820ba2d2019-06-18 18:59:09 -0700370 kotlincflags: ["-Xjvm-default=enable"],
371
Jason Monka2f2d822018-08-13 11:10:48 -0400372 dxflags: ["--multi-dex"],
Winson Chungb754f522020-08-03 22:17:08 -0700373 required: [
374 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700375 "wmshell.protolog.json.gz",
Winson Chungb754f522020-08-03 22:17:08 -0700376 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400377}