blob: 4dddbf65e8faacecfce1ce05dfc74109e8e5913a [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",
26 srcs: [ "src/**/*.java", "src/**/*.kt" ],
27}
28
29filegroup {
30 name: "launcher-quickstep-src",
31 srcs: [ "quickstep/src/**/*.java", "quickstep/src/**/*.kt" ],
32}
33
34filegroup {
35 name: "launcher-go-src",
36 srcs: [ "go/src/**/*.java", "go/src/**/*.kt" ],
37}
38
39filegroup {
40 name: "launcher-go-quickstep-src",
41 srcs: [ "go/quickstep/src/**/*.java", "go/quickstep/src/**/*.kt" ],
42}
43
44filegroup {
45 name: "launcher-src_shortcuts_overrides",
46 srcs: [ "src_shortcuts_overrides/**/*.java", "src_shortcuts_overrides/**/*.kt" ],
47}
48
49filegroup {
50 name: "launcher-src_ui_overrides",
51 srcs: [ "src_ui_overrides/**/*.java", "src_ui_overrides/**/*.kt" ],
52}
53
54filegroup {
55 name: "launcher-ext_tests",
56 srcs: [ "ext_tests/**/*.java", "ext_tests/**/*.kt" ],
57}
58
59filegroup {
60 name: "launcher-quickstep-ext_tests",
61 srcs: [ "quickstep/ext_tests/**/*.java", "quickstep/ext_tests/**/*.kt" ],
62}
63
64// Proguard files for Launcher3
65filegroup {
66 name: "launcher-proguard-rules",
67 srcs: ["proguard.flags"],
68}
69
vadimt09df0832019-03-07 14:59:30 -080070android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070071 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -070072 libs: [
73 "framework-statsd",
74 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070075 static_libs: [
76 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -070077 "androidx.test.runner",
78 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070079 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -070080 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070081 "SystemUISharedLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +000082 "animationlib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +000083 "launcher-testing-shared",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070084 ],
85 srcs: [
86 "tests/tapl/**/*.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070087 ],
Sunny Goyal572aca42021-03-24 15:21:39 -070088 resource_dirs: [ ],
vadimt09df0832019-03-07 14:59:30 -080089 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070090 platform_apis: true,
91}
thiruram5e1ecf62019-11-13 17:49:35 -080092
93java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080094 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080095 srcs: [
96 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080097 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080098 ],
99 sdk_version: "current",
100 proto: {
101 type: "lite",
102 local_include_dirs:[
103 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800104 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800105 ],
106 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800107 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800108}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800109
thiruramcbeb13d2021-01-27 14:45:58 -0800110java_library_static {
111 name: "launcher_quickstep_log_protos_lite",
112 srcs: [
113 "quickstep/protos_overrides/*.proto",
114 ],
115 sdk_version: "current",
116 proto: {
117 type: "lite",
118 local_include_dirs:[
119 "quickstep/protos_overrides",
120 ],
121 },
122 static_libs: [
123 "libprotobuf-java-lite",
124 "launcher_log_protos_lite"
125 ],
126}
127
Hyunyoung Song8605be32020-02-21 14:52:25 -0800128java_library {
129 name: "LauncherPluginLib",
130
131 static_libs: ["PluginCoreLib"],
132
133 srcs: ["src_plugins/**/*.java"],
134
135 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700136 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800137}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800138
Anushree Ganjamd1a28fe2023-08-23 21:40:57 -0700139aconfig_declarations {
140 name: "launcher_flags",
141 package: "com.google.android.platform.launcher.aconfig.flags",
142 srcs: ["launcher.aconfig"],
143}
144
145java_aconfig_library {
146 name: "launcher_flags_lib",
147 aconfig_declarations: "launcher_flags",
148}
149
150java_aconfig_library {
151 name: "launcher_flags_lib_test",
152 aconfig_declarations: "launcher_flags",
153 test: true
154}
155
156
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800157// Library with all the dependencies for building Launcher3
158android_library {
159 name: "Launcher3ResLib",
160 srcs: [ ],
161 resource_dirs: ["res"],
162 static_libs: [
163 "LauncherPluginLib",
164 "launcher_quickstep_log_protos_lite",
165 "androidx-constraintlayout_constraintlayout",
166 "androidx.recyclerview_recyclerview",
167 "androidx.dynamicanimation_dynamicanimation",
168 "androidx.fragment_fragment",
169 "androidx.preference_preference",
170 "androidx.slice_slice-view",
171 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400172 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800173 "iconloader_base",
Johannes Gallmanna82eebd2023-07-21 18:02:07 +0200174 "view_capture",
175 "animationlib"
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800176 ],
177 manifest: "AndroidManifest-common.xml",
178 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700179 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000180 lint: {
181 baseline_filename: "lint-baseline-res-lib.xml",
182 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800183}
184
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800185//
186// Build rule for Launcher3 dependencies lib.
187//
Anushree Ganjamd1a28fe2023-08-23 21:40:57 -0700188java_defaults {
189 name: "Launcher3CommonDepsDefault",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800190 srcs: ["src_build_config/**/*.java"],
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000191 static_libs: [
192 "Launcher3ResLib",
193 "launcher-testing-shared",
Kateryna Ivanova71203732023-05-24 15:09:00 +0000194 "animationlib"
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000195 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800196 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700197 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800198 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000199 lint: {
200 baseline_filename: "lint-baseline-common-deps-lib.xml",
201 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800202}
203
204//
Anushree Ganjamd1a28fe2023-08-23 21:40:57 -0700205// Build rule for Launcher3 dependencies lib.
206//
207android_library {
208 name: "Launcher3CommonDepsLib",
209 defaults: ["Launcher3CommonDepsDefault"],
210 static_libs: [
211 "launcher_flags_lib",
212 ],
213}
214
215//
216// Build rule for Launcher3 dependencies lib for test and debug.
217//
218android_library {
219 name: "Launcher3CommonDepsLibDebug",
220 defaults: ["Launcher3CommonDepsDefault"],
221 static_libs: [
222 "launcher_flags_lib_test",
223 ],
224}
225
226//
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800227// Build rule for Launcher3 app.
228//
229android_app {
230 name: "Launcher3",
231
232 static_libs: [
Anushree Ganjamd1a28fe2023-08-23 21:40:57 -0700233 "Launcher3CommonDepsLibDebug",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800234 ],
235 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000236 ":launcher-src",
237 ":launcher-src_shortcuts_overrides",
238 ":launcher-src_ui_overrides",
239 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800240 ],
241 resource_dirs: [
242 "ext_tests/res",
243 ],
244 optimize: {
245 proguard_flags_files: ["proguard.flags"],
246 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
247 enabled: false,
248 },
249
250 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700251 min_sdk_version: min_launcher3_sdk_version,
252 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800253 privileged: true,
254 system_ext_specific: true,
255
256 overrides: [
257 "Home",
258 "Launcher2",
259 ],
260 required: ["privapp_whitelist_com.android.launcher3"],
261
262 jacoco: {
263 include_filter: ["com.android.launcher3.**"],
264 },
265 additional_manifests: [
266 "AndroidManifest-common.xml",
267 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000268 lint: {
269 baseline_filename: "lint-baseline-launcher3.xml",
270 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800271}
272
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800273// Library with all the dependencies for building quickstep
274android_library {
275 name: "QuickstepResLib",
276 srcs: [ ],
277 resource_dirs: [
278 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800279 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700280 libs: [
281 "framework-statsd",
282 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800283 static_libs: [
284 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800285 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800286 "SystemUISharedLib",
287 "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",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800292}
293
294
Jon Spivacka65d68b2021-04-07 10:22:25 -0700295// Library with all the dependencies for building Launcher Go
296android_library {
297 name: "LauncherGoResLib",
298 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000299 ":launcher-src",
300 ":launcher-quickstep-src",
301 ":launcher-go-src",
302 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700303 ],
304 resource_dirs: [
305 "go/res",
306 "go/quickstep/res",
307 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000308 // Note the ordering here is important when it comes to resource
309 // overriding. We want the most specific resource overrides defined
310 // in QuickstepResLib to take precendece, so it should be the final
311 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700312 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000313 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700314 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700315 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700316 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700317 plugins: ["androidx.room_room-compiler-plugin"],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530318 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700319 additional_manifests: [
320 "go/AndroidManifest.xml",
321 "AndroidManifest-common.xml",
322 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700323 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000324 lint: {
325 baseline_filename: "lint-baseline-go-res-lib.xml",
326 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700327}
328
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700329// Build rule for Quickstep library
330android_library {
331 name: "Launcher3QuickStepLib",
332 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000333 ":launcher-src",
334 ":launcher-quickstep-src",
335 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700336 ],
Thales Limac335ad22021-11-08 15:31:49 +0000337 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700338 libs: [
339 "framework-statsd",
340 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000341 // Note the ordering here is important when it comes to resource
342 // overriding. We want the most specific resource overrides defined
343 // in QuickstepResLib to take precendece, so it should be the final
344 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700345 static_libs: [
346 "SystemUI-statsd",
347 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000348 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000349 "QuickstepResLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000350 "animationlib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700351 ],
352 manifest: "quickstep/AndroidManifest.xml",
353 platform_apis: true,
354 min_sdk_version: "current",
355 lint: {
356 baseline_filename: "lint-baseline-launcher3.xml",
357 },
358}
Thales Lima813834a2022-05-18 15:29:59 +0000359
360// Build rule for Launcher3 Go app for Android Go devices.
361android_app {
362 name: "Launcher3Go",
363
364 static_libs: ["Launcher3CommonDepsLib"],
365
366 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000367 ":launcher-src",
368 ":launcher-go-src",
369 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000370 ],
371
372 resource_dirs: ["go/res"],
373
374 optimize: {
375 proguard_flags_files: ["proguard.flags"],
376 },
377
378 sdk_version: "current",
379 min_sdk_version: "current",
380 target_sdk_version: "current",
381 privileged: true,
382 system_ext_specific: true,
383 overrides: [
384 "Home",
385 "Launcher2",
386 "Launcher3",
387 "Launcher3QuickStep",
388 ],
389 required: ["privapp_whitelist_com.android.launcher3"],
390
391 additional_manifests: [
392 "AndroidManifest.xml",
393 "AndroidManifest-common.xml",
394 ],
395
396 manifest: "go/AndroidManifest.xml",
397 jacoco: {
398 include_filter: ["com.android.launcher3.*"],
399 }
400
401}
402
403// Build rule for Quickstep app.
404android_app {
405 name: "Launcher3QuickStep",
406
407 static_libs: ["Launcher3QuickStepLib"],
408 optimize: {
409 enabled: false,
410 },
411
412 platform_apis: true,
413 min_sdk_version: "current",
414 target_sdk_version: "current",
415
416 privileged: true,
417 system_ext_specific: true,
418 overrides: [
419 "Home",
420 "Launcher2",
421 "Launcher3",
422 ],
423 required: ["privapp_whitelist_com.android.launcher3"],
424
425 resource_dirs: ["quickstep/res"],
426
427 additional_manifests: [
428 "quickstep/AndroidManifest-launcher.xml",
429 "AndroidManifest-common.xml",
430 ],
431
432 manifest: "quickstep/AndroidManifest.xml",
433 jacoco: {
434 include_filter: ["com.android.launcher3.*"],
435 }
436
437}
438
439// Build rule for Launcher3 Go app with quickstep for Android Go devices.
440android_app {
441 name: "Launcher3QuickStepGo",
442
443 static_libs: [
444 "SystemUI-statsd",
445 "SystemUISharedLib",
446 "LauncherGoResLib",
447 ],
448
449 platform_apis: true,
450 min_sdk_version: "current",
451 target_sdk_version: "current",
452
Thales Lima2c54bbf2022-07-12 15:45:10 +0000453 srcs: [ ],
Thales Lima813834a2022-05-18 15:29:59 +0000454
455 resource_dirs: [
456 "go/quickstep/res",
457 "go/res",
458 "quickstep/res",
459 ],
460
461 optimize: {
462 proguard_flags_files: ["proguard.flags"],
463 enabled: true,
464 },
465
466 privileged: true,
467 system_ext_specific: true,
468 overrides: [
469 "Home",
470 "Launcher2",
471 "Launcher3",
472 "Launcher3QuickStep",
473 ],
474 required: ["privapp_whitelist_com.android.launcher3"],
475
476 additional_manifests: [
477 "go/AndroidManifest.xml",
478 "go/AndroidManifest-launcher.xml",
479 "AndroidManifest-common.xml",
480 ],
481
482 manifest: "quickstep/AndroidManifest.xml",
483 jacoco: {
484 include_filter: ["com.android.launcher3.*"],
485 }
486
487}
488