blob: e2dd48dc5783cb7e8e0a673d095540b8364d57a1 [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,
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",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400178 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800179 "iconloader_base",
Johannes Gallmanna82eebd2023-07-21 18:02:07 +0200180 "view_capture",
Cole Faustbad33e62023-12-20 11:57:04 -0800181 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800182 ],
183 manifest: "AndroidManifest-common.xml",
184 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700185 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000186 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800187 baseline_filename: "lint-baseline2.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000188 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800189}
190
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800191//
192// Build rule for Launcher3 dependencies lib.
193//
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700194android_library {
195 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800196 srcs: ["src_build_config/**/*.java"],
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000197 static_libs: [
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000198 "SystemUI-statsd",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000199 "Launcher3ResLib",
200 "launcher-testing-shared",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700201 "animationlib",
202 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700203 "com_android_wm_shell_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000204 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800205 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700206 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800207 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000208 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800209 baseline_filename: "lint-baseline2.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000210 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800211}
212
213//
214// Build rule for Launcher3 app.
215//
216android_app {
217 name: "Launcher3",
218
219 static_libs: [
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700220 "Launcher3CommonDepsLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800221 ],
222 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000223 ":launcher-src",
224 ":launcher-src_shortcuts_overrides",
225 ":launcher-src_ui_overrides",
226 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800227 ],
228 resource_dirs: [
229 "ext_tests/res",
230 ],
231 optimize: {
232 proguard_flags_files: ["proguard.flags"],
233 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
234 enabled: false,
235 },
236
237 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700238 min_sdk_version: min_launcher3_sdk_version,
239 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800240 privileged: true,
241 system_ext_specific: true,
242
243 overrides: [
244 "Home",
245 "Launcher2",
246 ],
247 required: ["privapp_whitelist_com.android.launcher3"],
248
249 jacoco: {
250 include_filter: ["com.android.launcher3.**"],
251 },
252 additional_manifests: [
253 "AndroidManifest-common.xml",
254 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000255 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800256 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000257 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800258}
259
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800260// Library with all the dependencies for building quickstep
261android_library {
262 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800263 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800264 resource_dirs: [
265 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800266 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700267 libs: [
268 "framework-statsd",
269 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800270 static_libs: [
271 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800272 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800273 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000274 "SettingsLibSettingsTheme",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800275 "SystemUI-statsd",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000276 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800277 ],
278 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700279 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800280}
281
Jon Spivacka65d68b2021-04-07 10:22:25 -0700282// Library with all the dependencies for building Launcher Go
283android_library {
284 name: "LauncherGoResLib",
285 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000286 ":launcher-src",
287 ":launcher-quickstep-src",
288 ":launcher-go-src",
289 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700290 ],
291 resource_dirs: [
292 "go/res",
293 "go/quickstep/res",
294 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000295 // Note the ordering here is important when it comes to resource
296 // overriding. We want the most specific resource overrides defined
297 // in QuickstepResLib to take precendece, so it should be the final
298 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700299 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000300 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700301 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700302 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700303 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700304 plugins: ["androidx.room_room-compiler-plugin"],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530305 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700306 additional_manifests: [
307 "go/AndroidManifest.xml",
308 "AndroidManifest-common.xml",
309 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700310 min_sdk_version: "current",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700311}
312
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700313// Build rule for Quickstep library
314android_library {
315 name: "Launcher3QuickStepLib",
316 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000317 ":launcher-src",
318 ":launcher-quickstep-src",
319 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700320 ],
Thales Limac335ad22021-11-08 15:31:49 +0000321 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700322 libs: [
323 "framework-statsd",
324 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000325 // Note the ordering here is important when it comes to resource
326 // overriding. We want the most specific resource overrides defined
327 // in QuickstepResLib to take precendece, so it should be the final
328 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700329 static_libs: [
330 "SystemUI-statsd",
331 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000332 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000333 "QuickstepResLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000334 "animationlib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700335 ],
336 manifest: "quickstep/AndroidManifest.xml",
337 platform_apis: true,
338 min_sdk_version: "current",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700339}
Thales Lima813834a2022-05-18 15:29:59 +0000340
341// Build rule for Launcher3 Go app for Android Go devices.
342android_app {
343 name: "Launcher3Go",
344
345 static_libs: ["Launcher3CommonDepsLib"],
346
347 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000348 ":launcher-src",
349 ":launcher-go-src",
350 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000351 ],
352
353 resource_dirs: ["go/res"],
354
355 optimize: {
356 proguard_flags_files: ["proguard.flags"],
357 },
358
359 sdk_version: "current",
360 min_sdk_version: "current",
361 target_sdk_version: "current",
362 privileged: true,
363 system_ext_specific: true,
364 overrides: [
365 "Home",
366 "Launcher2",
367 "Launcher3",
368 "Launcher3QuickStep",
369 ],
370 required: ["privapp_whitelist_com.android.launcher3"],
371
372 additional_manifests: [
373 "AndroidManifest.xml",
374 "AndroidManifest-common.xml",
375 ],
376
377 manifest: "go/AndroidManifest.xml",
378 jacoco: {
379 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800380 },
Thales Lima813834a2022-05-18 15:29:59 +0000381
382}
383
384// Build rule for Quickstep app.
385android_app {
386 name: "Launcher3QuickStep",
387
388 static_libs: ["Launcher3QuickStepLib"],
389 optimize: {
390 enabled: false,
391 },
392
393 platform_apis: true,
394 min_sdk_version: "current",
395 target_sdk_version: "current",
396
397 privileged: true,
398 system_ext_specific: true,
399 overrides: [
400 "Home",
401 "Launcher2",
402 "Launcher3",
403 ],
404 required: ["privapp_whitelist_com.android.launcher3"],
405
406 resource_dirs: ["quickstep/res"],
407
408 additional_manifests: [
409 "quickstep/AndroidManifest-launcher.xml",
410 "AndroidManifest-common.xml",
411 ],
412
413 manifest: "quickstep/AndroidManifest.xml",
414 jacoco: {
415 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800416 },
Thales Lima813834a2022-05-18 15:29:59 +0000417
418}
419
420// Build rule for Launcher3 Go app with quickstep for Android Go devices.
421android_app {
422 name: "Launcher3QuickStepGo",
423
424 static_libs: [
425 "SystemUI-statsd",
426 "SystemUISharedLib",
427 "LauncherGoResLib",
428 ],
429
430 platform_apis: true,
431 min_sdk_version: "current",
432 target_sdk_version: "current",
433
Cole Faustbad33e62023-12-20 11:57:04 -0800434 srcs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000435
436 resource_dirs: [
437 "go/quickstep/res",
438 "go/res",
439 "quickstep/res",
440 ],
441
442 optimize: {
443 proguard_flags_files: ["proguard.flags"],
444 enabled: true,
445 },
446
447 privileged: true,
448 system_ext_specific: true,
449 overrides: [
450 "Home",
451 "Launcher2",
452 "Launcher3",
453 "Launcher3QuickStep",
454 ],
455 required: ["privapp_whitelist_com.android.launcher3"],
456
457 additional_manifests: [
458 "go/AndroidManifest.xml",
459 "go/AndroidManifest-launcher.xml",
460 "AndroidManifest-common.xml",
461 ],
462
463 manifest: "quickstep/AndroidManifest.xml",
464 jacoco: {
465 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800466 },
Thales Lima813834a2022-05-18 15:29:59 +0000467
468}