blob: eca0778600747433c1da9ac8b4e718ea8159b5eb [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: [
Uwais Ashraf77b97c02023-12-27 11:44:16 +0000110 "tests/multivalentTests/tapl/**/*.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700111 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800112 resource_dirs: [],
Uwais Ashraf77b97c02023-12-27 11:44:16 +0000113 manifest: "tests/multivalentTests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700114 platform_apis: true,
115}
thiruram5e1ecf62019-11-13 17:49:35 -0800116
117java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -0800118 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -0800119 srcs: [
120 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -0800121 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -0800122 ],
123 sdk_version: "current",
124 proto: {
125 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800126 local_include_dirs: [
thiruram5e1ecf62019-11-13 17:49:35 -0800127 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800128 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800129 ],
130 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800131 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800132}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800133
thiruramcbeb13d2021-01-27 14:45:58 -0800134java_library_static {
135 name: "launcher_quickstep_log_protos_lite",
136 srcs: [
137 "quickstep/protos_overrides/*.proto",
138 ],
139 sdk_version: "current",
140 proto: {
141 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800142 local_include_dirs: [
thiruramcbeb13d2021-01-27 14:45:58 -0800143 "quickstep/protos_overrides",
144 ],
145 },
146 static_libs: [
Cole Faustbad33e62023-12-20 11:57:04 -0800147 "libprotobuf-java-lite",
148 "launcher_log_protos_lite",
149 ],
thiruramcbeb13d2021-01-27 14:45:58 -0800150}
151
Hyunyoung Song8605be32020-02-21 14:52:25 -0800152java_library {
153 name: "LauncherPluginLib",
154
155 static_libs: ["PluginCoreLib"],
156
157 srcs: ["src_plugins/**/*.java"],
158
159 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700160 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800161}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800162
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800163// Library with all the dependencies for building Launcher3
164android_library {
165 name: "Launcher3ResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800166 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800167 resource_dirs: ["res"],
168 static_libs: [
169 "LauncherPluginLib",
170 "launcher_quickstep_log_protos_lite",
171 "androidx-constraintlayout_constraintlayout",
172 "androidx.recyclerview_recyclerview",
173 "androidx.dynamicanimation_dynamicanimation",
174 "androidx.fragment_fragment",
175 "androidx.preference_preference",
176 "androidx.slice_slice-view",
177 "androidx.cardview_cardview",
Sebastian Franco9ae40322023-10-10 10:50:28 -0700178 "androidx.window_window",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400179 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800180 "iconloader_base",
Johannes Gallmanna82eebd2023-07-21 18:02:07 +0200181 "view_capture",
Cole Faustbad33e62023-12-20 11:57:04 -0800182 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800183 ],
184 manifest: "AndroidManifest-common.xml",
185 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700186 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000187 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800188 baseline_filename: "lint-baseline2.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000189 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800190}
191
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800192//
193// Build rule for Launcher3 dependencies lib.
194//
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700195android_library {
196 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800197 srcs: ["src_build_config/**/*.java"],
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000198 static_libs: [
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000199 "SystemUI-statsd",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000200 "Launcher3ResLib",
201 "launcher-testing-shared",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700202 "animationlib",
203 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700204 "com_android_wm_shell_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000205 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800206 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700207 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800208 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000209 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800210 baseline_filename: "lint-baseline2.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000211 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800212}
213
214//
215// Build rule for Launcher3 app.
216//
217android_app {
218 name: "Launcher3",
219
220 static_libs: [
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700221 "Launcher3CommonDepsLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800222 ],
223 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000224 ":launcher-src",
225 ":launcher-src_shortcuts_overrides",
226 ":launcher-src_ui_overrides",
227 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800228 ],
229 resource_dirs: [
230 "ext_tests/res",
231 ],
232 optimize: {
233 proguard_flags_files: ["proguard.flags"],
234 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
235 enabled: false,
236 },
237
238 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700239 min_sdk_version: min_launcher3_sdk_version,
240 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800241 privileged: true,
242 system_ext_specific: true,
243
244 overrides: [
245 "Home",
246 "Launcher2",
247 ],
248 required: ["privapp_whitelist_com.android.launcher3"],
249
250 jacoco: {
251 include_filter: ["com.android.launcher3.**"],
252 },
253 additional_manifests: [
254 "AndroidManifest-common.xml",
255 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000256 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800257 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000258 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800259}
260
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800261// Library with all the dependencies for building quickstep
262android_library {
263 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800264 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800265 resource_dirs: [
266 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800267 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700268 libs: [
269 "framework-statsd",
270 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800271 static_libs: [
272 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800273 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800274 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000275 "SettingsLibSettingsTheme",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800276 "SystemUI-statsd",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000277 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800278 ],
279 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700280 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800281}
282
Jon Spivacka65d68b2021-04-07 10:22:25 -0700283// Library with all the dependencies for building Launcher Go
284android_library {
285 name: "LauncherGoResLib",
286 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000287 ":launcher-src",
288 ":launcher-quickstep-src",
289 ":launcher-go-src",
290 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700291 ],
292 resource_dirs: [
293 "go/res",
294 "go/quickstep/res",
295 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000296 // Note the ordering here is important when it comes to resource
297 // overriding. We want the most specific resource overrides defined
298 // in QuickstepResLib to take precendece, so it should be the final
299 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700300 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000301 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700302 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700303 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700304 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700305 plugins: ["androidx.room_room-compiler-plugin"],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530306 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700307 additional_manifests: [
308 "go/AndroidManifest.xml",
309 "AndroidManifest-common.xml",
310 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700311 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800312 // TODO(b/319712088): re-enable use_resource_processor
313 use_resource_processor: false,
Jon Spivacka65d68b2021-04-07 10:22:25 -0700314}
315
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700316// Build rule for Quickstep library
317android_library {
318 name: "Launcher3QuickStepLib",
319 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000320 ":launcher-src",
321 ":launcher-quickstep-src",
322 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700323 ],
Thales Limac335ad22021-11-08 15:31:49 +0000324 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700325 libs: [
326 "framework-statsd",
327 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000328 // Note the ordering here is important when it comes to resource
329 // overriding. We want the most specific resource overrides defined
330 // in QuickstepResLib to take precendece, so it should be the final
331 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700332 static_libs: [
333 "SystemUI-statsd",
334 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000335 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000336 "QuickstepResLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000337 "animationlib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700338 ],
339 manifest: "quickstep/AndroidManifest.xml",
340 platform_apis: true,
341 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800342 // TODO(b/319712088): re-enable use_resource_processor
343 use_resource_processor: false,
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700344}
Thales Lima813834a2022-05-18 15:29:59 +0000345
346// Build rule for Launcher3 Go app for Android Go devices.
347android_app {
348 name: "Launcher3Go",
349
350 static_libs: ["Launcher3CommonDepsLib"],
351
352 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000353 ":launcher-src",
354 ":launcher-go-src",
355 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000356 ],
357
358 resource_dirs: ["go/res"],
359
360 optimize: {
361 proguard_flags_files: ["proguard.flags"],
362 },
363
364 sdk_version: "current",
365 min_sdk_version: "current",
366 target_sdk_version: "current",
367 privileged: true,
368 system_ext_specific: true,
369 overrides: [
370 "Home",
371 "Launcher2",
372 "Launcher3",
373 "Launcher3QuickStep",
374 ],
375 required: ["privapp_whitelist_com.android.launcher3"],
376
377 additional_manifests: [
378 "AndroidManifest.xml",
379 "AndroidManifest-common.xml",
380 ],
381
382 manifest: "go/AndroidManifest.xml",
383 jacoco: {
384 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800385 },
Thales Lima813834a2022-05-18 15:29:59 +0000386
387}
388
389// Build rule for Quickstep app.
390android_app {
391 name: "Launcher3QuickStep",
392
393 static_libs: ["Launcher3QuickStepLib"],
394 optimize: {
395 enabled: false,
396 },
397
398 platform_apis: true,
399 min_sdk_version: "current",
400 target_sdk_version: "current",
401
402 privileged: true,
403 system_ext_specific: true,
404 overrides: [
405 "Home",
406 "Launcher2",
407 "Launcher3",
408 ],
409 required: ["privapp_whitelist_com.android.launcher3"],
410
411 resource_dirs: ["quickstep/res"],
412
413 additional_manifests: [
414 "quickstep/AndroidManifest-launcher.xml",
415 "AndroidManifest-common.xml",
416 ],
417
418 manifest: "quickstep/AndroidManifest.xml",
419 jacoco: {
420 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800421 },
Thales Lima813834a2022-05-18 15:29:59 +0000422
423}
424
425// Build rule for Launcher3 Go app with quickstep for Android Go devices.
426android_app {
427 name: "Launcher3QuickStepGo",
428
429 static_libs: [
430 "SystemUI-statsd",
431 "SystemUISharedLib",
432 "LauncherGoResLib",
433 ],
434
435 platform_apis: true,
436 min_sdk_version: "current",
437 target_sdk_version: "current",
438
Cole Faustbad33e62023-12-20 11:57:04 -0800439 srcs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000440
441 resource_dirs: [
442 "go/quickstep/res",
443 "go/res",
444 "quickstep/res",
445 ],
446
447 optimize: {
448 proguard_flags_files: ["proguard.flags"],
449 enabled: true,
450 },
451
452 privileged: true,
453 system_ext_specific: true,
454 overrides: [
455 "Home",
456 "Launcher2",
457 "Launcher3",
458 "Launcher3QuickStep",
459 ],
460 required: ["privapp_whitelist_com.android.launcher3"],
461
462 additional_manifests: [
463 "go/AndroidManifest.xml",
464 "go/AndroidManifest-launcher.xml",
465 "AndroidManifest-common.xml",
466 ],
467
468 manifest: "quickstep/AndroidManifest.xml",
469 jacoco: {
470 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800471 },
Thales Lima813834a2022-05-18 15:29:59 +0000472
473}