blob: f45394a998f43a7d1a499ea70267b623d5d29209 [file] [log] [blame]
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -07001// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour4bdf3802021-02-12 17:08:17 -080015package {
Bob Badoura7548b52022-01-27 22:04:48 -080016 // See: http://go/android-license-faq
17 default_applicable_licenses: ["Android-Apache-2.0"],
Bob Badour4bdf3802021-02-12 17:08:17 -080018}
19
Sunny Goyal9d2ece12024-03-22 13:52:19 -070020min_launcher3_sdk_version = "30"
Sunny Goyal1fb271f2021-05-20 10:43:23 -070021
Thales Lima2c54bbf2022-07-12 15:45:10 +000022// Common source files used to build launcher (java and kotlin)
23// All sources are split so they can be reused in many other libraries/apps in other folders
24filegroup {
25 name: "launcher-src",
Cole Faustbad33e62023-12-20 11:57:04 -080026 srcs: [
27 "src/**/*.java",
28 "src/**/*.kt",
29 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000030}
31
32filegroup {
33 name: "launcher-quickstep-src",
Cole Faustbad33e62023-12-20 11:57:04 -080034 srcs: [
35 "quickstep/src/**/*.java",
36 "quickstep/src/**/*.kt",
37 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000038}
39
40filegroup {
41 name: "launcher-go-src",
Cole Faustbad33e62023-12-20 11:57:04 -080042 srcs: [
43 "go/src/**/*.java",
44 "go/src/**/*.kt",
45 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000046}
47
48filegroup {
49 name: "launcher-go-quickstep-src",
Cole Faustbad33e62023-12-20 11:57:04 -080050 srcs: [
51 "go/quickstep/src/**/*.java",
52 "go/quickstep/src/**/*.kt",
53 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000054}
55
56filegroup {
57 name: "launcher-src_shortcuts_overrides",
Cole Faustbad33e62023-12-20 11:57:04 -080058 srcs: [
59 "src_shortcuts_overrides/**/*.java",
60 "src_shortcuts_overrides/**/*.kt",
61 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000062}
63
64filegroup {
65 name: "launcher-src_ui_overrides",
Cole Faustbad33e62023-12-20 11:57:04 -080066 srcs: [
67 "src_ui_overrides/**/*.java",
68 "src_ui_overrides/**/*.kt",
69 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000070}
71
Thales Lima2c54bbf2022-07-12 15:45:10 +000072// Proguard files for Launcher3
73filegroup {
74 name: "launcher-proguard-rules",
75 srcs: ["proguard.flags"],
76}
77
vadimt09df0832019-03-07 14:59:30 -080078android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070079 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -070080 libs: [
81 "framework-statsd",
82 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070083 static_libs: [
84 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -070085 "androidx.test.runner",
86 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070087 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -070088 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070089 "SystemUISharedLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +000090 "animationlib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +000091 "launcher-testing-shared",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070092 ],
93 srcs: [
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +000094 "tests/tapl/**/*.java",
95 "tests/tapl/**/*.kt",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070096 ],
Cole Faustbad33e62023-12-20 11:57:04 -080097 resource_dirs: [],
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +000098 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070099 platform_apis: true,
100}
thiruram5e1ecf62019-11-13 17:49:35 -0800101
102java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -0800103 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -0800104 srcs: [
105 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -0800106 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -0800107 ],
108 sdk_version: "current",
109 proto: {
110 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800111 local_include_dirs: [
thiruram5e1ecf62019-11-13 17:49:35 -0800112 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800113 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800114 ],
115 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800116 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800117}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800118
thiruramcbeb13d2021-01-27 14:45:58 -0800119java_library_static {
120 name: "launcher_quickstep_log_protos_lite",
121 srcs: [
122 "quickstep/protos_overrides/*.proto",
123 ],
124 sdk_version: "current",
125 proto: {
126 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800127 local_include_dirs: [
thiruramcbeb13d2021-01-27 14:45:58 -0800128 "quickstep/protos_overrides",
129 ],
130 },
131 static_libs: [
Cole Faustbad33e62023-12-20 11:57:04 -0800132 "libprotobuf-java-lite",
133 "launcher_log_protos_lite",
134 ],
thiruramcbeb13d2021-01-27 14:45:58 -0800135}
136
Hyunyoung Song8605be32020-02-21 14:52:25 -0800137java_library {
138 name: "LauncherPluginLib",
139
140 static_libs: ["PluginCoreLib"],
141
142 srcs: ["src_plugins/**/*.java"],
143
144 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700145 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800146}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800147
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800148// Library with all the dependencies for building Launcher3
149android_library {
150 name: "Launcher3ResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800151 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800152 resource_dirs: ["res"],
153 static_libs: [
154 "LauncherPluginLib",
155 "launcher_quickstep_log_protos_lite",
156 "androidx-constraintlayout_constraintlayout",
157 "androidx.recyclerview_recyclerview",
158 "androidx.dynamicanimation_dynamicanimation",
159 "androidx.fragment_fragment",
160 "androidx.preference_preference",
161 "androidx.slice_slice-view",
162 "androidx.cardview_cardview",
Sebastian Franco9ae40322023-10-10 10:50:28 -0700163 "androidx.window_window",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400164 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800165 "iconloader_base",
Johannes Gallmanna82eebd2023-07-21 18:02:07 +0200166 "view_capture",
Cole Faustbad33e62023-12-20 11:57:04 -0800167 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800168 ],
169 manifest: "AndroidManifest-common.xml",
170 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700171 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000172 lint: {
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700173 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000174 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800175}
176
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800177//
178// Build rule for Launcher3 dependencies lib.
179//
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700180android_library {
181 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800182 srcs: ["src_build_config/**/*.java"],
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000183 static_libs: [
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000184 "SystemUI-statsd",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000185 "Launcher3ResLib",
186 "launcher-testing-shared",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700187 "animationlib",
Uwais Ashrafe2625dc2024-03-18 08:59:31 +0000188 "kotlinx_coroutines_android",
189 "kotlinx_coroutines",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700190 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700191 "com_android_wm_shell_flags_lib",
Willie Koomsonfedc18e2023-11-07 22:31:46 +0000192 "android.appwidget.flags-aconfig-java",
Eghosa Ewansiha-Vlachavas80232ea2024-02-20 16:08:45 +0000193 "com.android.window.flags.window-aconfig-java",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000194 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800195 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700196 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800197 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000198 lint: {
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700199 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000200 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800201}
202
203//
204// Build rule for Launcher3 app.
205//
206android_app {
207 name: "Launcher3",
208
209 static_libs: [
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700210 "Launcher3CommonDepsLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800211 ],
212 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000213 ":launcher-src",
214 ":launcher-src_shortcuts_overrides",
215 ":launcher-src_ui_overrides",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800216 ],
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700217
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800218 optimize: {
219 proguard_flags_files: ["proguard.flags"],
220 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
221 enabled: false,
222 },
223
224 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700225 min_sdk_version: min_launcher3_sdk_version,
226 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800227 privileged: true,
228 system_ext_specific: true,
229
230 overrides: [
231 "Home",
232 "Launcher2",
233 ],
234 required: ["privapp_whitelist_com.android.launcher3"],
235
236 jacoco: {
237 include_filter: ["com.android.launcher3.**"],
238 },
239 additional_manifests: [
240 "AndroidManifest-common.xml",
241 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000242 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800243 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000244 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800245}
246
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800247// Library with all the dependencies for building quickstep
248android_library {
249 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800250 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800251 resource_dirs: [
252 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800253 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700254 libs: [
255 "framework-statsd",
256 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800257 static_libs: [
258 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800259 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800260 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000261 "SettingsLibSettingsTheme",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800262 "SystemUI-statsd",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000263 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800264 ],
265 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700266 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800267}
268
Jon Spivacka65d68b2021-04-07 10:22:25 -0700269// Library with all the dependencies for building Launcher Go
270android_library {
271 name: "LauncherGoResLib",
272 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000273 ":launcher-src",
274 ":launcher-quickstep-src",
275 ":launcher-go-src",
276 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700277 ],
278 resource_dirs: [
279 "go/res",
280 "go/quickstep/res",
281 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000282 // Note the ordering here is important when it comes to resource
283 // overriding. We want the most specific resource overrides defined
284 // in QuickstepResLib to take precendece, so it should be the final
285 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700286 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000287 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700288 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700289 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700290 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700291 plugins: ["androidx.room_room-compiler-plugin"],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530292 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700293 additional_manifests: [
294 "go/AndroidManifest.xml",
295 "AndroidManifest-common.xml",
296 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700297 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800298 // TODO(b/319712088): re-enable use_resource_processor
299 use_resource_processor: false,
Jon Spivacka65d68b2021-04-07 10:22:25 -0700300}
301
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700302// Build rule for Quickstep library
303android_library {
304 name: "Launcher3QuickStepLib",
305 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000306 ":launcher-src",
307 ":launcher-quickstep-src",
308 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700309 ],
Thales Limac335ad22021-11-08 15:31:49 +0000310 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700311 libs: [
312 "framework-statsd",
313 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000314 // Note the ordering here is important when it comes to resource
315 // overriding. We want the most specific resource overrides defined
316 // in QuickstepResLib to take precendece, so it should be the final
317 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700318 static_libs: [
319 "SystemUI-statsd",
320 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000321 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000322 "QuickstepResLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000323 "animationlib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700324 ],
325 manifest: "quickstep/AndroidManifest.xml",
326 platform_apis: true,
327 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800328 // TODO(b/319712088): re-enable use_resource_processor
329 use_resource_processor: false,
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700330}
Thales Lima813834a2022-05-18 15:29:59 +0000331
332// Build rule for Launcher3 Go app for Android Go devices.
333android_app {
334 name: "Launcher3Go",
335
336 static_libs: ["Launcher3CommonDepsLib"],
337
338 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000339 ":launcher-src",
340 ":launcher-go-src",
341 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000342 ],
343
344 resource_dirs: ["go/res"],
345
346 optimize: {
347 proguard_flags_files: ["proguard.flags"],
348 },
349
350 sdk_version: "current",
351 min_sdk_version: "current",
352 target_sdk_version: "current",
353 privileged: true,
354 system_ext_specific: true,
355 overrides: [
356 "Home",
357 "Launcher2",
358 "Launcher3",
359 "Launcher3QuickStep",
360 ],
361 required: ["privapp_whitelist_com.android.launcher3"],
362
363 additional_manifests: [
364 "AndroidManifest.xml",
365 "AndroidManifest-common.xml",
366 ],
367
368 manifest: "go/AndroidManifest.xml",
369 jacoco: {
370 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800371 },
Thales Lima813834a2022-05-18 15:29:59 +0000372
373}
374
375// Build rule for Quickstep app.
376android_app {
377 name: "Launcher3QuickStep",
378
379 static_libs: ["Launcher3QuickStepLib"],
380 optimize: {
381 enabled: false,
382 },
383
384 platform_apis: true,
385 min_sdk_version: "current",
386 target_sdk_version: "current",
387
388 privileged: true,
389 system_ext_specific: true,
390 overrides: [
391 "Home",
392 "Launcher2",
393 "Launcher3",
394 ],
395 required: ["privapp_whitelist_com.android.launcher3"],
396
397 resource_dirs: ["quickstep/res"],
398
399 additional_manifests: [
400 "quickstep/AndroidManifest-launcher.xml",
401 "AndroidManifest-common.xml",
402 ],
403
404 manifest: "quickstep/AndroidManifest.xml",
405 jacoco: {
406 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800407 },
Thales Lima813834a2022-05-18 15:29:59 +0000408
409}
410
411// Build rule for Launcher3 Go app with quickstep for Android Go devices.
412android_app {
413 name: "Launcher3QuickStepGo",
414
415 static_libs: [
416 "SystemUI-statsd",
417 "SystemUISharedLib",
418 "LauncherGoResLib",
419 ],
420
421 platform_apis: true,
422 min_sdk_version: "current",
423 target_sdk_version: "current",
424
Cole Faustbad33e62023-12-20 11:57:04 -0800425 srcs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000426
427 resource_dirs: [
428 "go/quickstep/res",
429 "go/res",
430 "quickstep/res",
431 ],
432
433 optimize: {
434 proguard_flags_files: ["proguard.flags"],
435 enabled: true,
436 },
437
438 privileged: true,
439 system_ext_specific: true,
440 overrides: [
441 "Home",
442 "Launcher2",
443 "Launcher3",
444 "Launcher3QuickStep",
445 ],
446 required: ["privapp_whitelist_com.android.launcher3"],
447
448 additional_manifests: [
449 "go/AndroidManifest.xml",
450 "go/AndroidManifest-launcher.xml",
451 "AndroidManifest-common.xml",
452 ],
453
454 manifest: "quickstep/AndroidManifest.xml",
455 jacoco: {
456 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800457 },
Thales Lima813834a2022-05-18 15:29:59 +0000458
459}