blob: eb58703d1bdd8a937477c17b2b3422935dd49921 [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
Xiaozhen Lin53063042022-11-23 02:18:08 +000069//Create a library to expose SystemUI's resources to other modules.
70android_library {
71 name: "SystemUI-res",
72 resource_dirs: [
73 "res-product",
74 "res-keyguard",
75 "res",
76 ],
77 static_libs: [
78 "SystemUISharedLib",
79 "SettingsLib",
80 "androidx.leanback_leanback",
81 "androidx.slice_slice-core",
82 "androidx.slice_slice-view",
83 ],
84 manifest: "AndroidManifest-res.xml",
85}
86
Jason Monka2f2d822018-08-13 11:10:48 -040087android_library {
88 name: "SystemUI-core",
89 srcs: [
Jason Monkae7ced22018-08-22 16:56:58 -040090 "src/**/*.kt",
Jason Monka2f2d822018-08-13 11:10:48 -040091 "src/**/*.java",
92 "src/**/I*.aidl",
Dave Mankoff72a50022021-11-02 20:44:54 -040093 ":ReleaseJavaFiles",
Jason Monka2f2d822018-08-13 11:10:48 -040094 ],
Jay Aliomer97d4fc7d2021-09-23 16:59:09 -040095 product_variables: {
96 debuggable: {
97 srcs: [":DebugJavaFiles"],
98 exclude_srcs: [":ReleaseJavaFiles"],
99 },
100 },
Jason Monka2f2d822018-08-13 11:10:48 -0400101 resource_dirs: [
Sunny Goyalb4a26012019-12-05 15:49:41 -0800102 "res-product",
Jason Monka2f2d822018-08-13 11:10:48 -0400103 "res-keyguard",
104 "res",
105 ],
106 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700107 "WifiTrackerLib",
Winson Chung10a9b4b2019-12-18 10:01:36 -0800108 "WindowManager-Shell",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200109 "SystemUIAnimationLib",
Jason Monka2f2d822018-08-13 11:10:48 -0400110 "SystemUIPluginLib",
111 "SystemUISharedLib",
Jerry Chang919d1d22020-07-16 12:31:24 +0800112 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -0400113 "SettingsLib",
Alejandro Nijamkin38859642022-06-27 14:18:17 -0700114 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500115 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -0400116 "androidx.legacy_legacy-support-v4",
117 "androidx.recyclerview_recyclerview",
118 "androidx.preference_preference",
119 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500120 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400121 "androidx.mediarouter_mediarouter",
122 "androidx.palette_palette",
123 "androidx.legacy_legacy-preference-v14",
124 "androidx.leanback_leanback",
125 "androidx.slice_slice-core",
126 "androidx.slice_slice-view",
127 "androidx.slice_slice-builders",
128 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800129 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400130 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200131 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800132 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400133 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500134 "androidx.exifinterface_exifinterface",
Rahul Banerjee326c2502022-11-01 11:54:45 -0700135 "androidx.test.ext.junit",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800136 "com.google.android.material_material",
Steve Elliotta7d72052020-12-16 23:04:19 -0500137 "kotlinx_coroutines_android",
138 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800139 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400140 "SystemUI-tags",
141 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000142 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400143 "dagger2",
Andy Wickham64e34102021-03-07 16:02:01 -0800144 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400145 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400146 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000147 "motion_tool_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400148 ],
149 manifest: "AndroidManifest.xml",
150
Kevin Jeonf2e72182022-04-04 19:05:05 +0000151 javacflags: ["-Adagger.fastInit=enabled"],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700152 kotlincflags: ["-Xjvm-default=enable"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500153
Dave Mankoffdffcc472020-07-08 15:25:16 -0400154 plugins: ["dagger2-compiler"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000155
156 lint: {
157 extra_check_modules: ["SystemUILintChecker"],
158 },
Jason Monka2f2d822018-08-13 11:10:48 -0400159}
160
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900161filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500162 name: "AAA-src",
163 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
164 path: "tests/src",
165}
166
167filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900168 name: "SystemUI-tests-utils",
169 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200170 "tests/utils/src/**/*.java",
171 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400172 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200173 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900174}
175
Bryce Leea5b08082021-10-06 11:34:56 -0700176java_library {
177 name: "SystemUI-tests-concurrency",
178 srcs: [
179 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
180 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200181 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
182 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700183 ],
184 jarjar_rules: ":jarjar-rules-shared",
185}
186
Jason Monkae7ced22018-08-22 16:56:58 -0400187android_library {
188 name: "SystemUI-tests",
Sunny Goyaleb18d392020-02-07 16:48:14 -0800189 manifest: "tests/AndroidManifest-base.xml",
190 additional_manifests: ["tests/AndroidManifest.xml"],
191
Jason Monkae7ced22018-08-22 16:56:58 -0400192 resource_dirs: [
193 "tests/res",
Sunny Goyalb4a26012019-12-05 15:49:41 -0800194 "res-product",
Jason Monkae7ced22018-08-22 16:56:58 -0400195 "res-keyguard",
196 "res",
197 ],
198 srcs: [
199 "tests/src/**/*.kt",
200 "tests/src/**/*.java",
201 "src/**/*.kt",
202 "src/**/*.java",
203 "src/**/I*.aidl",
Dave Mankoff1a934e92021-10-21 10:30:19 -0400204 ":ReleaseJavaFiles",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200205 ":SystemUI-tests-utils",
Jason Monkae7ced22018-08-22 16:56:58 -0400206 ],
207 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700208 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200209 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400210 "SystemUIPluginLib",
211 "SystemUISharedLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700212 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400213 "SettingsLib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500214 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400215 "androidx.legacy_legacy-support-v4",
216 "androidx.recyclerview_recyclerview",
217 "androidx.preference_preference",
218 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500219 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400220 "androidx.mediarouter_mediarouter",
221 "androidx.palette_palette",
222 "androidx.legacy_legacy-preference-v14",
223 "androidx.leanback_leanback",
224 "androidx.slice_slice-core",
225 "androidx.slice_slice-view",
226 "androidx.slice_slice-builders",
227 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800228 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400229 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200230 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800231 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400232 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500233 "androidx.exifinterface_exifinterface",
Pinyao Tingee191b12020-04-29 18:35:39 -0700234 "kotlinx-coroutines-android",
235 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700236 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000237 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700238 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400239 "SystemUI-tags",
240 "SystemUI-proto",
241 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900242 "hamcrest-library",
243 "androidx.test.rules",
Daniel Peykov6d91c982022-09-16 16:49:16 +0000244 "androidx.test.uiautomator_uiautomator",
Beverly9028d412019-12-11 16:33:16 -0500245 "mockito-target-extended-minus-junit4",
omarmtd1c43ea2022-10-21 14:39:43 +0000246 "androidx.test.ext.junit",
Jason Monkae7ced22018-08-22 16:56:58 -0400247 "testables",
248 "truth-prebuilt",
Lucas Dupine37369f2021-08-31 00:19:39 +0000249 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400250 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800251 "jsr330",
252 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400253 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000254 "motion_tool_lib",
Jason Monkae7ced22018-08-22 16:56:58 -0400255 ],
256 libs: [
257 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400258 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200259 "android.test.mock",
Jason Monkae7ced22018-08-22 16:56:58 -0400260 ],
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
Jared Duke84e94b32022-08-05 13:46:38 -0700272// Opt-out config for optimizing the SystemUI target using R8.
273// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
274// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800275soong_config_module_type {
276 name: "systemui_optimized_java_defaults",
277 module_type: "java_defaults",
278 config_namespace: "ANDROID",
279 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
280 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700281}
282
Jared Duke9dfa77b2021-12-22 13:31:06 -0800283systemui_optimized_java_defaults {
Jared Duke2fee7402021-10-18 14:35:04 -0700284 name: "SystemUI_app_defaults",
285 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800286 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700287 optimize: {
288 enabled: true,
289 optimize: true,
290 shrink: true,
Jared Dukef0904172022-06-07 18:01:06 +0000291 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700292 proguard_flags_files: ["proguard.flags"],
293 },
294 conditions_default: {
295 optimize: {
Jared Dukef0904172022-06-07 18:01:06 +0000296 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700297 proguard_flags_files: ["proguard.flags"],
298 },
299 },
300 },
301 },
302}
303
Jason Monka2f2d822018-08-13 11:10:48 -0400304android_app {
305 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700306 defaults: [
307 "platform_app_defaults",
308 "SystemUI_app_defaults",
309 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400310 static_libs: [
311 "SystemUI-core",
312 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000313 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400314
315 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900316 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400317 certificate: "platform",
318 privileged: true,
319
Selim Cinek820ba2d2019-06-18 18:59:09 -0700320 kotlincflags: ["-Xjvm-default=enable"],
321
Jason Monka2f2d822018-08-13 11:10:48 -0400322 dxflags: ["--multi-dex"],
Winson Chungb754f522020-08-03 22:17:08 -0700323 required: [
324 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700325 "wmshell.protolog.json.gz",
Winson Chungb754f522020-08-03 22:17:08 -0700326 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400327}