blob: 9d7a9e7aac8a7a5daa1ae669ea17234f3e539e03 [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",
Jerry Chang919d1d22020-07-16 12:31:24 +080094 "SystemUI-statsd",
Jason Monka2f2d822018-08-13 11:10:48 -040095 "SettingsLib",
Alejandro Nijamkin6f22abf62022-06-27 14:18:17 -070096 "androidx.core_core-ktx",
Fabian Kozynski713b7272020-03-03 18:35:52 -050097 "androidx.viewpager2_viewpager2",
Jason Monka2f2d822018-08-13 11:10:48 -040098 "androidx.legacy_legacy-support-v4",
99 "androidx.recyclerview_recyclerview",
100 "androidx.preference_preference",
101 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500102 "androidx.concurrent_concurrent-futures",
Jason Monka2f2d822018-08-13 11:10:48 -0400103 "androidx.mediarouter_mediarouter",
104 "androidx.palette_palette",
105 "androidx.legacy_legacy-preference-v14",
106 "androidx.leanback_leanback",
107 "androidx.slice_slice-core",
108 "androidx.slice_slice-view",
109 "androidx.slice_slice-builders",
110 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800111 "androidx.lifecycle_lifecycle-common-java8",
Jason Monka2f2d822018-08-13 11:10:48 -0400112 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200113 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800114 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400115 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500116 "androidx.exifinterface_exifinterface",
Rahul Banerjee326c2502022-11-01 11:54:45 -0700117 "androidx.test.ext.junit",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800118 "com.google.android.material_material",
Steve Elliotta7d72052020-12-16 23:04:19 -0500119 "kotlinx_coroutines_android",
120 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800121 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400122 "SystemUI-tags",
123 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000124 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400125 "dagger2",
Andy Wickham64e34102021-03-07 16:02:01 -0800126 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400127 "lottie",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400128 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000129 "motion_tool_lib",
Jason Monka2f2d822018-08-13 11:10:48 -0400130 ],
131 manifest: "AndroidManifest.xml",
132
Selim Cinek820ba2d2019-06-18 18:59:09 -0700133 kotlincflags: ["-Xjvm-default=enable"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500134
Dave Mankoffdffcc472020-07-08 15:25:16 -0400135 plugins: ["dagger2-compiler"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000136
137 lint: {
138 extra_check_modules: ["SystemUILintChecker"],
139 },
Jason Monka2f2d822018-08-13 11:10:48 -0400140}
141
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900142filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500143 name: "AAA-src",
144 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
145 path: "tests/src",
146}
147
148filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900149 name: "SystemUI-tests-utils",
150 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200151 "tests/utils/src/**/*.java",
152 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400153 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200154 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900155}
156
Bryce Leea5b08082021-10-06 11:34:56 -0700157java_library {
158 name: "SystemUI-tests-concurrency",
159 srcs: [
160 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
161 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200162 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
163 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700164 ],
165 jarjar_rules: ":jarjar-rules-shared",
166}
167
Jason Monkae7ced22018-08-22 16:56:58 -0400168android_library {
169 name: "SystemUI-tests",
Sunny Goyaleb18d392020-02-07 16:48:14 -0800170 manifest: "tests/AndroidManifest-base.xml",
171 additional_manifests: ["tests/AndroidManifest.xml"],
172
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 ],
179 srcs: [
180 "tests/src/**/*.kt",
181 "tests/src/**/*.java",
182 "src/**/*.kt",
183 "src/**/*.java",
184 "src/**/I*.aidl",
Dave Mankoff1a934e92021-10-21 10:30:19 -0400185 ":ReleaseJavaFiles",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200186 ":SystemUI-tests-utils",
Jason Monkae7ced22018-08-22 16:56:58 -0400187 ],
188 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700189 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200190 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400191 "SystemUIPluginLib",
192 "SystemUISharedLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700193 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400194 "SettingsLib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500195 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400196 "androidx.legacy_legacy-support-v4",
197 "androidx.recyclerview_recyclerview",
198 "androidx.preference_preference",
199 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500200 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400201 "androidx.mediarouter_mediarouter",
202 "androidx.palette_palette",
203 "androidx.legacy_legacy-preference-v14",
204 "androidx.leanback_leanback",
205 "androidx.slice_slice-core",
206 "androidx.slice_slice-view",
207 "androidx.slice_slice-builders",
208 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800209 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400210 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200211 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800212 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400213 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500214 "androidx.exifinterface_exifinterface",
Pinyao Tingee191b12020-04-29 18:35:39 -0700215 "kotlinx-coroutines-android",
216 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700217 "kotlinx_coroutines_test",
Chandru917e4bc2022-08-19 14:25:31 +0000218 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700219 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400220 "SystemUI-tags",
221 "SystemUI-proto",
222 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900223 "hamcrest-library",
224 "androidx.test.rules",
225 "androidx.test.uiautomator",
Beverly9028d412019-12-11 16:33:16 -0500226 "mockito-target-extended-minus-junit4",
omarmtd1c43ea2022-10-21 14:39:43 +0000227 "androidx.test.ext.junit",
Jason Monkae7ced22018-08-22 16:56:58 -0400228 "testables",
229 "truth-prebuilt",
Lucas Dupine37369f2021-08-31 00:19:39 +0000230 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400231 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800232 "jsr330",
233 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400234 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000235 "motion_tool_lib",
Jason Monkae7ced22018-08-22 16:56:58 -0400236 ],
237 libs: [
238 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400239 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200240 "android.test.mock",
Jason Monkae7ced22018-08-22 16:56:58 -0400241 ],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700242 kotlincflags: ["-Xjvm-default=enable"],
Jason Monkae7ced22018-08-22 16:56:58 -0400243 aaptflags: [
244 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700245 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400246 ],
Dave Mankoffdffcc472020-07-08 15:25:16 -0400247 plugins: ["dagger2-compiler"],
Jason Monkae7ced22018-08-22 16:56:58 -0400248}
249
Jared Duke84e94b32022-08-05 13:46:38 -0700250// Opt-out config for optimizing the SystemUI target using R8.
251// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
252// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800253soong_config_module_type {
254 name: "systemui_optimized_java_defaults",
255 module_type: "java_defaults",
256 config_namespace: "ANDROID",
257 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
258 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700259}
260
Jared Duke9dfa77b2021-12-22 13:31:06 -0800261systemui_optimized_java_defaults {
Jared Duke2fee7402021-10-18 14:35:04 -0700262 name: "SystemUI_app_defaults",
263 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800264 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700265 optimize: {
266 enabled: true,
267 optimize: true,
268 shrink: true,
269 proguard_flags_files: ["proguard.flags"],
270 },
271 conditions_default: {
272 optimize: {
273 proguard_flags_files: ["proguard.flags"],
274 },
275 },
276 },
277 },
278}
279
Jason Monka2f2d822018-08-13 11:10:48 -0400280android_app {
281 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700282 defaults: [
283 "platform_app_defaults",
284 "SystemUI_app_defaults",
285 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400286 static_libs: [
287 "SystemUI-core",
288 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000289 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400290
291 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900292 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400293 certificate: "platform",
294 privileged: true,
295
Selim Cinek820ba2d2019-06-18 18:59:09 -0700296 kotlincflags: ["-Xjvm-default=enable"],
297
Jason Monka2f2d822018-08-13 11:10:48 -0400298 dxflags: ["--multi-dex"],
Winson Chungb754f522020-08-03 22:17:08 -0700299 required: [
300 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700301 "wmshell.protolog.json.gz",
Winson Chungb754f522020-08-03 22:17:08 -0700302 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400303}