blob: f50dc74210e69de396cbe0ac933060d43d9aafa0 [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",
Lucas Dupin00c1a602022-02-16 16:40:36 -0800117 "com.google.android.material_material",
Steve Elliotta7d72052020-12-16 23:04:19 -0500118 "kotlinx_coroutines_android",
119 "kotlinx_coroutines",
Hyunyoung Song5347a542019-03-01 13:32:28 -0800120 "iconloader_base",
Jason Monka2f2d822018-08-13 11:10:48 -0400121 "SystemUI-tags",
122 "SystemUI-proto",
Lucas Dupine37369f2021-08-31 00:19:39 +0000123 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400124 "dagger2",
Andy Wickham64e34102021-03-07 16:02:01 -0800125 "jsr330",
Beverly46817e12021-06-22 16:29:52 -0400126 "lottie",
Jason Monka2f2d822018-08-13 11:10:48 -0400127 ],
128 manifest: "AndroidManifest.xml",
129
Selim Cinek820ba2d2019-06-18 18:59:09 -0700130 kotlincflags: ["-Xjvm-default=enable"],
Jason Monk73e8ffc2018-12-06 14:45:19 -0500131
Dave Mankoffdffcc472020-07-08 15:25:16 -0400132 plugins: ["dagger2-compiler"],
Jernej Viragbb4ff3f2022-03-10 17:52:11 +0000133
134 lint: {
135 extra_check_modules: ["SystemUILintChecker"],
136 },
Jason Monka2f2d822018-08-13 11:10:48 -0400137}
138
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900139filegroup {
Fabian Kozynskid389df52022-01-06 10:52:51 -0500140 name: "AAA-src",
141 srcs: ["tests/src/com/android/AAAPlusPlusVerifySysuiRequiredTestPropertiesTest.java"],
142 path: "tests/src",
143}
144
145filegroup {
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900146 name: "SystemUI-tests-utils",
147 srcs: [
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200148 "tests/utils/src/**/*.java",
149 "tests/utils/src/**/*.kt",
Dave Mankoffb4935a22021-06-01 15:12:15 -0400150 ],
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200151 path: "tests/utils/src",
Tadashi G. Takaokaa6572dc2019-09-17 15:18:53 +0900152}
153
Bryce Leea5b08082021-10-06 11:34:56 -0700154java_library {
155 name: "SystemUI-tests-concurrency",
156 srcs: [
157 "src/com/android/systemui/util/concurrency/DelayableExecutor.java",
158 "src/com/android/systemui/util/time/SystemClock.java",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200159 "tests/utils/src/com/android/systemui/util/concurrency/FakeExecutor.java",
160 "tests/utils/src/com/android/systemui/util/time/FakeSystemClock.java",
Bryce Leea5b08082021-10-06 11:34:56 -0700161 ],
162 jarjar_rules: ":jarjar-rules-shared",
163}
164
Jason Monkae7ced22018-08-22 16:56:58 -0400165android_library {
166 name: "SystemUI-tests",
Sunny Goyaleb18d392020-02-07 16:48:14 -0800167 manifest: "tests/AndroidManifest-base.xml",
168 additional_manifests: ["tests/AndroidManifest.xml"],
169
Jason Monkae7ced22018-08-22 16:56:58 -0400170 resource_dirs: [
171 "tests/res",
Sunny Goyalb4a26012019-12-05 15:49:41 -0800172 "res-product",
Jason Monkae7ced22018-08-22 16:56:58 -0400173 "res-keyguard",
174 "res",
175 ],
176 srcs: [
177 "tests/src/**/*.kt",
178 "tests/src/**/*.java",
179 "src/**/*.kt",
180 "src/**/*.java",
181 "src/**/I*.aidl",
Dave Mankoff1a934e92021-10-21 10:30:19 -0400182 ":ReleaseJavaFiles",
Jordan Demeulenaeref7fed3c2022-07-28 18:06:49 +0200183 ":SystemUI-tests-utils",
Jason Monkae7ced22018-08-22 16:56:58 -0400184 ],
185 static_libs: [
Quang Luongc6fc5b22021-06-10 14:35:32 -0700186 "WifiTrackerLib",
Jordan Demeulenaerecea62bb2021-04-08 11:04:50 +0200187 "SystemUIAnimationLib",
Jason Monkae7ced22018-08-22 16:56:58 -0400188 "SystemUIPluginLib",
189 "SystemUISharedLib",
Hyunyoung Song3d89c932020-04-11 13:31:06 -0700190 "SystemUI-statsd",
Jason Monkae7ced22018-08-22 16:56:58 -0400191 "SettingsLib",
Fabian Kozynski713b7272020-03-03 18:35:52 -0500192 "androidx.viewpager2_viewpager2",
Jason Monkae7ced22018-08-22 16:56:58 -0400193 "androidx.legacy_legacy-support-v4",
194 "androidx.recyclerview_recyclerview",
195 "androidx.preference_preference",
196 "androidx.appcompat_appcompat",
Mark Renoufe2395012020-12-16 01:05:12 -0500197 "androidx.concurrent_concurrent-futures",
Jason Monkae7ced22018-08-22 16:56:58 -0400198 "androidx.mediarouter_mediarouter",
199 "androidx.palette_palette",
200 "androidx.legacy_legacy-preference-v14",
201 "androidx.leanback_leanback",
202 "androidx.slice_slice-core",
203 "androidx.slice_slice-view",
204 "androidx.slice_slice-builders",
205 "androidx.arch.core_core-runtime",
Bryce Lee436e42c2022-01-24 14:53:49 -0800206 "androidx.lifecycle_lifecycle-common-java8",
Jason Monkae7ced22018-08-22 16:56:58 -0400207 "androidx.lifecycle_lifecycle-extensions",
Jordan Demeulenaere8a169ff2022-07-13 10:42:10 +0200208 "androidx.lifecycle_lifecycle-runtime-ktx",
Joshua Tsujib1a796b2019-01-16 15:43:12 -0800209 "androidx.dynamicanimation_dynamicanimation",
Steve Elliott300b48f2019-05-29 14:13:50 -0400210 "androidx-constraintlayout_constraintlayout",
Miranda Kepharte1a22b92020-12-16 14:01:12 -0500211 "androidx.exifinterface_exifinterface",
Pinyao Tingee191b12020-04-29 18:35:39 -0700212 "kotlinx-coroutines-android",
213 "kotlinx-coroutines-core",
Alejandro Nijamkinc738a8c2022-07-25 13:30:41 -0700214 "kotlinx_coroutines_test",
Chandru917e4bc2022-08-19 14:25:31 +0000215 "kotlin-reflect",
Lyn Han1b4f25e2019-06-11 13:56:34 -0700216 "iconloader_base",
Jason Monkae7ced22018-08-22 16:56:58 -0400217 "SystemUI-tags",
218 "SystemUI-proto",
219 "metrics-helper-lib",
Tadashi G. Takaokac7340fb2020-10-20 17:50:13 +0900220 "hamcrest-library",
221 "androidx.test.rules",
222 "androidx.test.uiautomator",
Beverly9028d412019-12-11 16:33:16 -0500223 "mockito-target-extended-minus-junit4",
Jason Monkae7ced22018-08-22 16:56:58 -0400224 "testables",
225 "truth-prebuilt",
Lucas Dupine37369f2021-08-31 00:19:39 +0000226 "monet",
Dave Mankoffdffcc472020-07-08 15:25:16 -0400227 "dagger2",
Bill Lina17858d12020-07-14 10:30:10 +0800228 "jsr330",
229 "WindowManager-Shell",
Jason Monkae7ced22018-08-22 16:56:58 -0400230 ],
231 libs: [
232 "android.test.runner",
Jason Monkae7ced22018-08-22 16:56:58 -0400233 "android.test.base",
Jordan Demeulenaere6fb22d42022-08-19 15:00:36 +0200234 "android.test.mock",
Jason Monkae7ced22018-08-22 16:56:58 -0400235 ],
Selim Cinek820ba2d2019-06-18 18:59:09 -0700236 kotlincflags: ["-Xjvm-default=enable"],
Jason Monkae7ced22018-08-22 16:56:58 -0400237 aaptflags: [
238 "--extra-packages",
Hyunyoung Song8f9d34c2019-08-30 14:47:43 -0700239 "com.android.systemui",
Jason Monkae7ced22018-08-22 16:56:58 -0400240 ],
Dave Mankoffdffcc472020-07-08 15:25:16 -0400241 plugins: ["dagger2-compiler"],
Jason Monkae7ced22018-08-22 16:56:58 -0400242}
243
Jared Duke84e94b32022-08-05 13:46:38 -0700244// Opt-out config for optimizing the SystemUI target using R8.
245// Disabled via `export SYSTEMUI_OPTIMIZE_JAVA=false`, or explicitly in Make via
246// `SYSTEMUI_OPTIMIZE_JAVA := false`.
Jared Duke9dfa77b2021-12-22 13:31:06 -0800247soong_config_module_type {
248 name: "systemui_optimized_java_defaults",
249 module_type: "java_defaults",
250 config_namespace: "ANDROID",
251 bool_variables: ["SYSTEMUI_OPTIMIZE_JAVA"],
252 properties: ["optimize"],
Jared Duke2fee7402021-10-18 14:35:04 -0700253}
254
Jared Duke9dfa77b2021-12-22 13:31:06 -0800255systemui_optimized_java_defaults {
Jared Duke2fee7402021-10-18 14:35:04 -0700256 name: "SystemUI_app_defaults",
257 soong_config_variables: {
Jared Duke9dfa77b2021-12-22 13:31:06 -0800258 SYSTEMUI_OPTIMIZE_JAVA: {
Jared Duke2fee7402021-10-18 14:35:04 -0700259 optimize: {
260 enabled: true,
261 optimize: true,
262 shrink: true,
263 proguard_flags_files: ["proguard.flags"],
264 },
265 conditions_default: {
266 optimize: {
267 proguard_flags_files: ["proguard.flags"],
268 },
269 },
270 },
271 },
272}
273
Jason Monka2f2d822018-08-13 11:10:48 -0400274android_app {
275 name: "SystemUI",
Jared Duke2fee7402021-10-18 14:35:04 -0700276 defaults: [
277 "platform_app_defaults",
278 "SystemUI_app_defaults",
279 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400280 static_libs: [
281 "SystemUI-core",
282 ],
Anton Hansson7ccca9f2019-02-08 09:01:32 +0000283 resource_dirs: [],
Jason Monka2f2d822018-08-13 11:10:48 -0400284
285 platform_apis: true,
Jeongik Chad45d9e12019-12-04 13:38:39 +0900286 system_ext_specific: true,
Jason Monka2f2d822018-08-13 11:10:48 -0400287 certificate: "platform",
288 privileged: true,
289
Selim Cinek820ba2d2019-06-18 18:59:09 -0700290 kotlincflags: ["-Xjvm-default=enable"],
291
Jason Monka2f2d822018-08-13 11:10:48 -0400292 dxflags: ["--multi-dex"],
Winson Chungb754f522020-08-03 22:17:08 -0700293 required: [
294 "privapp_whitelist_com.android.systemui",
Winson Chungb754f522020-08-03 22:17:08 -0700295 ],
Jason Monka2f2d822018-08-13 11:10:48 -0400296}