blob: 19d2a5893b245e8288b35248a2f4e8627f639f53 [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 Goyal1fb271f2021-05-20 10:43:23 -070020min_launcher3_sdk_version = "26"
21
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
72filegroup {
73 name: "launcher-ext_tests",
Cole Faustbad33e62023-12-20 11:57:04 -080074 srcs: [
75 "ext_tests/**/*.java",
76 "ext_tests/**/*.kt",
77 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000078}
79
80filegroup {
81 name: "launcher-quickstep-ext_tests",
Cole Faustbad33e62023-12-20 11:57:04 -080082 srcs: [
83 "quickstep/ext_tests/**/*.java",
84 "quickstep/ext_tests/**/*.kt",
85 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000086}
87
88// Proguard files for Launcher3
89filegroup {
90 name: "launcher-proguard-rules",
91 srcs: ["proguard.flags"],
92}
93
vadimt09df0832019-03-07 14:59:30 -080094android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070095 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -070096 libs: [
97 "framework-statsd",
98 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070099 static_libs: [
100 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -0700101 "androidx.test.runner",
102 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700103 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -0700104 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700105 "SystemUISharedLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000106 "animationlib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000107 "launcher-testing-shared",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700108 ],
109 srcs: [
110 "tests/tapl/**/*.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700111 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800112 resource_dirs: [],
vadimt09df0832019-03-07 14:59:30 -0800113 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700114 platform_apis: true,
Cole Faustbad33e62023-12-20 11:57:04 -0800115 lint: {
116 baseline_filename: "lint-baseline.xml",
117 },
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700118}
thiruram5e1ecf62019-11-13 17:49:35 -0800119
120java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -0800121 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -0800122 srcs: [
123 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -0800124 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -0800125 ],
126 sdk_version: "current",
127 proto: {
128 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800129 local_include_dirs: [
thiruram5e1ecf62019-11-13 17:49:35 -0800130 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800131 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800132 ],
133 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800134 static_libs: ["libprotobuf-java-lite"],
Cole Faustbad33e62023-12-20 11:57:04 -0800135 lint: {
136 baseline_filename: "lint-baseline.xml",
137 },
thiruram5e1ecf62019-11-13 17:49:35 -0800138}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800139
thiruramcbeb13d2021-01-27 14:45:58 -0800140java_library_static {
141 name: "launcher_quickstep_log_protos_lite",
142 srcs: [
143 "quickstep/protos_overrides/*.proto",
144 ],
145 sdk_version: "current",
146 proto: {
147 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800148 local_include_dirs: [
thiruramcbeb13d2021-01-27 14:45:58 -0800149 "quickstep/protos_overrides",
150 ],
151 },
152 static_libs: [
Cole Faustbad33e62023-12-20 11:57:04 -0800153 "libprotobuf-java-lite",
154 "launcher_log_protos_lite",
155 ],
156 lint: {
157 baseline_filename: "lint-baseline.xml",
158 },
thiruramcbeb13d2021-01-27 14:45:58 -0800159}
160
Hyunyoung Song8605be32020-02-21 14:52:25 -0800161java_library {
162 name: "LauncherPluginLib",
163
164 static_libs: ["PluginCoreLib"],
165
166 srcs: ["src_plugins/**/*.java"],
167
168 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700169 min_sdk_version: min_launcher3_sdk_version,
Cole Faustbad33e62023-12-20 11:57:04 -0800170 lint: {
171 baseline_filename: "lint-baseline.xml",
172 },
Hyunyoung Song8605be32020-02-21 14:52:25 -0800173}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800174
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800175// Library with all the dependencies for building Launcher3
176android_library {
177 name: "Launcher3ResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800178 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800179 resource_dirs: ["res"],
180 static_libs: [
181 "LauncherPluginLib",
182 "launcher_quickstep_log_protos_lite",
183 "androidx-constraintlayout_constraintlayout",
184 "androidx.recyclerview_recyclerview",
185 "androidx.dynamicanimation_dynamicanimation",
186 "androidx.fragment_fragment",
187 "androidx.preference_preference",
188 "androidx.slice_slice-view",
189 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400190 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800191 "iconloader_base",
Johannes Gallmanna82eebd2023-07-21 18:02:07 +0200192 "view_capture",
Cole Faustbad33e62023-12-20 11:57:04 -0800193 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800194 ],
195 manifest: "AndroidManifest-common.xml",
196 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700197 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000198 lint: {
199 baseline_filename: "lint-baseline-res-lib.xml",
200 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800201}
202
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800203//
204// Build rule for Launcher3 dependencies lib.
205//
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700206android_library {
207 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800208 srcs: ["src_build_config/**/*.java"],
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000209 static_libs: [
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000210 "SystemUI-statsd",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000211 "Launcher3ResLib",
212 "launcher-testing-shared",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700213 "animationlib",
214 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700215 "com_android_wm_shell_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000216 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800217 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700218 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800219 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000220 lint: {
221 baseline_filename: "lint-baseline-common-deps-lib.xml",
222 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800223}
224
225//
226// Build rule for Launcher3 app.
227//
228android_app {
229 name: "Launcher3",
230
231 static_libs: [
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700232 "Launcher3CommonDepsLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800233 ],
234 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000235 ":launcher-src",
236 ":launcher-src_shortcuts_overrides",
237 ":launcher-src_ui_overrides",
238 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800239 ],
240 resource_dirs: [
241 "ext_tests/res",
242 ],
243 optimize: {
244 proguard_flags_files: ["proguard.flags"],
245 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
246 enabled: false,
247 },
248
249 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700250 min_sdk_version: min_launcher3_sdk_version,
251 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800252 privileged: true,
253 system_ext_specific: true,
254
255 overrides: [
256 "Home",
257 "Launcher2",
258 ],
259 required: ["privapp_whitelist_com.android.launcher3"],
260
261 jacoco: {
262 include_filter: ["com.android.launcher3.**"],
263 },
264 additional_manifests: [
265 "AndroidManifest-common.xml",
266 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000267 lint: {
268 baseline_filename: "lint-baseline-launcher3.xml",
269 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800270}
271
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800272// Library with all the dependencies for building quickstep
273android_library {
274 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800275 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800276 resource_dirs: [
277 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800278 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700279 libs: [
280 "framework-statsd",
281 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800282 static_libs: [
283 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800284 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800285 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000286 "SettingsLibSettingsTheme",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800287 "SystemUI-statsd",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000288 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800289 ],
290 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700291 min_sdk_version: "current",
Cole Faustbad33e62023-12-20 11:57:04 -0800292 lint: {
293 baseline_filename: "lint-baseline.xml",
294 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800295}
296
Jon Spivacka65d68b2021-04-07 10:22:25 -0700297// Library with all the dependencies for building Launcher Go
298android_library {
299 name: "LauncherGoResLib",
300 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000301 ":launcher-src",
302 ":launcher-quickstep-src",
303 ":launcher-go-src",
304 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700305 ],
306 resource_dirs: [
307 "go/res",
308 "go/quickstep/res",
309 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000310 // Note the ordering here is important when it comes to resource
311 // overriding. We want the most specific resource overrides defined
312 // in QuickstepResLib to take precendece, so it should be the final
313 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700314 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000315 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700316 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700317 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700318 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700319 plugins: ["androidx.room_room-compiler-plugin"],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530320 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700321 additional_manifests: [
322 "go/AndroidManifest.xml",
323 "AndroidManifest-common.xml",
324 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700325 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000326 lint: {
327 baseline_filename: "lint-baseline-go-res-lib.xml",
328 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700329}
330
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700331// Build rule for Quickstep library
332android_library {
333 name: "Launcher3QuickStepLib",
334 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000335 ":launcher-src",
336 ":launcher-quickstep-src",
337 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700338 ],
Thales Limac335ad22021-11-08 15:31:49 +0000339 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700340 libs: [
341 "framework-statsd",
342 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000343 // Note the ordering here is important when it comes to resource
344 // overriding. We want the most specific resource overrides defined
345 // in QuickstepResLib to take precendece, so it should be the final
346 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700347 static_libs: [
348 "SystemUI-statsd",
349 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000350 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000351 "QuickstepResLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000352 "animationlib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700353 ],
354 manifest: "quickstep/AndroidManifest.xml",
355 platform_apis: true,
356 min_sdk_version: "current",
357 lint: {
358 baseline_filename: "lint-baseline-launcher3.xml",
359 },
360}
Thales Lima813834a2022-05-18 15:29:59 +0000361
362// Build rule for Launcher3 Go app for Android Go devices.
363android_app {
364 name: "Launcher3Go",
365
366 static_libs: ["Launcher3CommonDepsLib"],
367
368 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000369 ":launcher-src",
370 ":launcher-go-src",
371 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000372 ],
373
374 resource_dirs: ["go/res"],
375
376 optimize: {
377 proguard_flags_files: ["proguard.flags"],
378 },
379
380 sdk_version: "current",
381 min_sdk_version: "current",
382 target_sdk_version: "current",
383 privileged: true,
384 system_ext_specific: true,
385 overrides: [
386 "Home",
387 "Launcher2",
388 "Launcher3",
389 "Launcher3QuickStep",
390 ],
391 required: ["privapp_whitelist_com.android.launcher3"],
392
393 additional_manifests: [
394 "AndroidManifest.xml",
395 "AndroidManifest-common.xml",
396 ],
397
398 manifest: "go/AndroidManifest.xml",
399 jacoco: {
400 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800401 },
402 lint: {
403 baseline_filename: "lint-baseline.xml",
404 },
Thales Lima813834a2022-05-18 15:29:59 +0000405
406}
407
408// Build rule for Quickstep app.
409android_app {
410 name: "Launcher3QuickStep",
411
412 static_libs: ["Launcher3QuickStepLib"],
413 optimize: {
414 enabled: false,
415 },
416
417 platform_apis: true,
418 min_sdk_version: "current",
419 target_sdk_version: "current",
420
421 privileged: true,
422 system_ext_specific: true,
423 overrides: [
424 "Home",
425 "Launcher2",
426 "Launcher3",
427 ],
428 required: ["privapp_whitelist_com.android.launcher3"],
429
430 resource_dirs: ["quickstep/res"],
431
432 additional_manifests: [
433 "quickstep/AndroidManifest-launcher.xml",
434 "AndroidManifest-common.xml",
435 ],
436
437 manifest: "quickstep/AndroidManifest.xml",
438 jacoco: {
439 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800440 },
441 lint: {
442 baseline_filename: "lint-baseline.xml",
443 },
Thales Lima813834a2022-05-18 15:29:59 +0000444
445}
446
447// Build rule for Launcher3 Go app with quickstep for Android Go devices.
448android_app {
449 name: "Launcher3QuickStepGo",
450
451 static_libs: [
452 "SystemUI-statsd",
453 "SystemUISharedLib",
454 "LauncherGoResLib",
455 ],
456
457 platform_apis: true,
458 min_sdk_version: "current",
459 target_sdk_version: "current",
460
Cole Faustbad33e62023-12-20 11:57:04 -0800461 srcs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000462
463 resource_dirs: [
464 "go/quickstep/res",
465 "go/res",
466 "quickstep/res",
467 ],
468
469 optimize: {
470 proguard_flags_files: ["proguard.flags"],
471 enabled: true,
472 },
473
474 privileged: true,
475 system_ext_specific: true,
476 overrides: [
477 "Home",
478 "Launcher2",
479 "Launcher3",
480 "Launcher3QuickStep",
481 ],
482 required: ["privapp_whitelist_com.android.launcher3"],
483
484 additional_manifests: [
485 "go/AndroidManifest.xml",
486 "go/AndroidManifest-launcher.xml",
487 "AndroidManifest-common.xml",
488 ],
489
490 manifest: "quickstep/AndroidManifest.xml",
491 jacoco: {
492 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800493 },
494 lint: {
495 baseline_filename: "lint-baseline.xml",
496 },
Thales Lima813834a2022-05-18 15:29:59 +0000497
498}