blob: 71ad886129bd943a888d4d6d80fe28cf3265bb15 [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 Nijamkin38859642022-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
Kevin Jeonf2e72182022-04-04 19:05:05 +0000133 javacflags: ["-Adagger.fastInit=enabled"],
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 {
170 name: "SystemUI-tests",
Sunny Goyaleb18d392020-02-07 16:48:14 -0800171 manifest: "tests/AndroidManifest-base.xml",
172 additional_manifests: ["tests/AndroidManifest.xml"],
173
Jason Monkae7ced22018-08-22 16:56:58 -0400174 resource_dirs: [
175 "tests/res",
Sunny Goyalb4a26012019-12-05 15:49:41 -0800176 "res-product",
Jason Monkae7ced22018-08-22 16:56:58 -0400177 "res-keyguard",
178 "res",
179 ],
180 srcs: [
181 "tests/src/**/*.kt",
182 "tests/src/**/*.java",
183 "src/**/*.kt",
184 "src/**/*.java",
185 "src/**/I*.aidl",
Dave Mankoff1a934e92021-10-21 10:30:19 -0400186 ":ReleaseJavaFiles",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200187 ":SystemUI-tests-utils",
Jason Monkae7ced22018-08-22 16:56:58 -0400188 ],
189 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700190 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200191 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400192 "SystemUIPluginLib",
193 "SystemUISharedLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700194 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400195 "SettingsLib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500196 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400197 "androidx.legacy_legacy-support-v4",
198 "androidx.recyclerview_recyclerview",
199 "androidx.preference_preference",
200 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500201 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400202 "androidx.mediarouter_mediarouter",
203 "androidx.palette_palette",
204 "androidx.legacy_legacy-preference-v14",
205 "androidx.leanback_leanback",
206 "androidx.slice_slice-core",
207 "androidx.slice_slice-view",
208 "androidx.slice_slice-builders",
209 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800210 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400211 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200212 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800213 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400214 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500215 "androidx.exifinterface_exifinterface",
Pinyao Tingee191b12020-04-29 18:35:39 -0700216 "kotlinx-coroutines-android",
217 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700218 "kotlinx_coroutines_test",
Chandru5a5e5332022-08-19 14:25:31 +0000219 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700220 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400221 "SystemUI-tags",
222 "SystemUI-proto",
223 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900224 "hamcrest-library",
225 "androidx.test.rules",
Daniel Peykov6d91c982022-09-16 16:49:16 +0000226 "androidx.test.uiautomator_uiautomator",
Beverly9028d412019-12-11 16:33:16 -0500227 "mockito-target-extended-minus-junit4",
omarmtd1c43ea2022-10-21 14:39:43 +0000228 "androidx.test.ext.junit",
Jason Monkae7ced22018-08-22 16:56:58 -0400229 "testables",
230 "truth-prebuilt",
Lucas Dupine37369f2021-08-31 00:19:39 +0000231 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400232 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800233 "jsr330",
234 "WindowManager-Shell",
Lucas Silva0bfb4052022-09-20 23:32:02 -0400235 "LowLightDreamLib",
Johannes Gallmann0d5183c2022-10-04 13:32:16 +0000236 "motion_tool_lib",
Jason Monkae7ced22018-08-22 16:56:58 -0400237 ],
238 libs: [
239 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400240 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200241 "android.test.mock",
Jason Monkae7ced22018-08-22 16:56:58 -0400242 ],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700243 kotlincflags: ["-Xjvm-default=enable"],
Jason Monkae7ced22018-08-22 16:56:58 -0400244 aaptflags: [
245 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700246 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400247 ],
Dave Mankoffdffcc472020-07-08 15:25:16 -0400248 plugins: ["dagger2-compiler"],
Cole Faust17f1e722022-08-16 15:30:26 -0700249 lint: {
250 test: true,
251 },
Jason Monkae7ced22018-08-22 16:56:58 -0400252}
253
Jared Duke84e94b32022-08-05 13:46:38 -0700254// Opt-out config for optimizing the SystemUI target using R8.
255// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
256// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800257soong_config_module_type {
258 name: "systemui_optimized_java_defaults",
259 module_type: "java_defaults",
260 config_namespace: "ANDROID",
261 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
262 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700263}
264
Jared Duke9dfa77b2021-12-22 13:31:06 -0800265systemui_optimized_java_defaults {
Jared Duke2fee7402021-10-18 14:35:04 -0700266 name: "SystemUI_app_defaults",
267 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800268 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700269 optimize: {
270 enabled: true,
271 optimize: true,
272 shrink: true,
Jared Dukef0904172022-06-07 18:01:06 +0000273 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700274 proguard_flags_files: ["proguard.flags"],
275 },
276 conditions_default: {
277 optimize: {
Jared Dukef0904172022-06-07 18:01:06 +0000278 proguard_compatibility: false,
Jared Duke2fee7402021-10-18 14:35:04 -0700279 proguard_flags_files: ["proguard.flags"],
280 },
281 },
282 },
283 },
284}
285
Jason Monka2f2d822018-08-13 11:10:48 -0400286android_app {
287 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700288 defaults: [
289 "platform_app_defaults",
290 "SystemUI_app_defaults",
291 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400292 static_libs: [
293 "SystemUI-core",
294 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000295 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400296
297 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900298 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400299 certificate: "platform",
300 privileged: true,
301
Selim Cinek820ba2d2019-06-18 18:59:09 -0700302 kotlincflags: ["-Xjvm-default=enable"],
303
Jason Monka2f2d822018-08-13 11:10:48 -0400304 dxflags: ["--multi-dex"],
Winson Chungb754f522020-08-03 22:17:08 -0700305 required: [
306 "privapp_whitelist_com.android.systemui",
Hongwei Wang2b227ee2022-08-19 09:38:18 -0700307 "wmshell.protolog.json.gz",
Winson Chungb754f522020-08-03 22:17:08 -0700308 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400309}