blob: cdada0a87fa3062201ca44a517a20006876231aa [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 Ashraf9c2f5a42024-03-04 09:49:39 +0000110 "tests/tapl/**/*.java",
111 "tests/tapl/**/*.kt",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700112 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800113 resource_dirs: [],
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +0000114 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700115 platform_apis: true,
116}
thiruram5e1ecf62019-11-13 17:49:35 -0800117
118java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -0800119 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -0800120 srcs: [
121 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -0800122 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -0800123 ],
124 sdk_version: "current",
125 proto: {
126 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800127 local_include_dirs: [
thiruram5e1ecf62019-11-13 17:49:35 -0800128 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800129 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800130 ],
131 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800132 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800133}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800134
thiruramcbeb13d2021-01-27 14:45:58 -0800135java_library_static {
136 name: "launcher_quickstep_log_protos_lite",
137 srcs: [
138 "quickstep/protos_overrides/*.proto",
139 ],
140 sdk_version: "current",
141 proto: {
142 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800143 local_include_dirs: [
thiruramcbeb13d2021-01-27 14:45:58 -0800144 "quickstep/protos_overrides",
145 ],
146 },
147 static_libs: [
Cole Faustbad33e62023-12-20 11:57:04 -0800148 "libprotobuf-java-lite",
149 "launcher_log_protos_lite",
150 ],
thiruramcbeb13d2021-01-27 14:45:58 -0800151}
152
Hyunyoung Song8605be32020-02-21 14:52:25 -0800153java_library {
154 name: "LauncherPluginLib",
155
156 static_libs: ["PluginCoreLib"],
157
158 srcs: ["src_plugins/**/*.java"],
159
160 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700161 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800162}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800163
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800164// Library with all the dependencies for building Launcher3
165android_library {
166 name: "Launcher3ResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800167 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800168 resource_dirs: ["res"],
169 static_libs: [
170 "LauncherPluginLib",
171 "launcher_quickstep_log_protos_lite",
172 "androidx-constraintlayout_constraintlayout",
173 "androidx.recyclerview_recyclerview",
174 "androidx.dynamicanimation_dynamicanimation",
175 "androidx.fragment_fragment",
176 "androidx.preference_preference",
177 "androidx.slice_slice-view",
178 "androidx.cardview_cardview",
Sebastian Franco9ae40322023-10-10 10:50:28 -0700179 "androidx.window_window",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400180 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800181 "iconloader_base",
Johannes Gallmanna82eebd2023-07-21 18:02:07 +0200182 "view_capture",
Cole Faustbad33e62023-12-20 11:57:04 -0800183 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800184 ],
185 manifest: "AndroidManifest-common.xml",
186 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700187 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000188 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800189 baseline_filename: "lint-baseline2.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000190 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800191}
192
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800193//
194// Build rule for Launcher3 dependencies lib.
195//
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700196android_library {
197 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800198 srcs: ["src_build_config/**/*.java"],
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000199 static_libs: [
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000200 "SystemUI-statsd",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000201 "Launcher3ResLib",
202 "launcher-testing-shared",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700203 "animationlib",
Uwais Ashrafe2625dc2024-03-18 08:59:31 +0000204 "kotlinx_coroutines_android",
205 "kotlinx_coroutines",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700206 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700207 "com_android_wm_shell_flags_lib",
Willie Koomsonfedc18e2023-11-07 22:31:46 +0000208 "android.appwidget.flags-aconfig-java",
Eghosa Ewansiha-Vlachavas80232ea2024-02-20 16:08:45 +0000209 "com.android.window.flags.window-aconfig-java",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000210 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800211 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700212 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800213 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000214 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800215 baseline_filename: "lint-baseline2.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000216 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800217}
218
219//
220// Build rule for Launcher3 app.
221//
222android_app {
223 name: "Launcher3",
224
225 static_libs: [
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700226 "Launcher3CommonDepsLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800227 ],
228 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000229 ":launcher-src",
230 ":launcher-src_shortcuts_overrides",
231 ":launcher-src_ui_overrides",
232 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800233 ],
234 resource_dirs: [
235 "ext_tests/res",
236 ],
237 optimize: {
238 proguard_flags_files: ["proguard.flags"],
239 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
240 enabled: false,
241 },
242
243 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700244 min_sdk_version: min_launcher3_sdk_version,
245 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800246 privileged: true,
247 system_ext_specific: true,
248
249 overrides: [
250 "Home",
251 "Launcher2",
252 ],
253 required: ["privapp_whitelist_com.android.launcher3"],
254
255 jacoco: {
256 include_filter: ["com.android.launcher3.**"],
257 },
258 additional_manifests: [
259 "AndroidManifest-common.xml",
260 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000261 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800262 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000263 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800264}
265
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800266// Library with all the dependencies for building quickstep
267android_library {
268 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800269 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800270 resource_dirs: [
271 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800272 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700273 libs: [
274 "framework-statsd",
275 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800276 static_libs: [
277 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800278 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800279 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000280 "SettingsLibSettingsTheme",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800281 "SystemUI-statsd",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000282 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800283 ],
284 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700285 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800286}
287
Jon Spivacka65d68b2021-04-07 10:22:25 -0700288// Library with all the dependencies for building Launcher Go
289android_library {
290 name: "LauncherGoResLib",
291 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000292 ":launcher-src",
293 ":launcher-quickstep-src",
294 ":launcher-go-src",
295 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700296 ],
297 resource_dirs: [
298 "go/res",
299 "go/quickstep/res",
300 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000301 // Note the ordering here is important when it comes to resource
302 // overriding. We want the most specific resource overrides defined
303 // in QuickstepResLib to take precendece, so it should be the final
304 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700305 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000306 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700307 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700308 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700309 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700310 plugins: ["androidx.room_room-compiler-plugin"],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530311 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700312 additional_manifests: [
313 "go/AndroidManifest.xml",
314 "AndroidManifest-common.xml",
315 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700316 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800317 // TODO(b/319712088): re-enable use_resource_processor
318 use_resource_processor: false,
Jon Spivacka65d68b2021-04-07 10:22:25 -0700319}
320
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700321// Build rule for Quickstep library
322android_library {
323 name: "Launcher3QuickStepLib",
324 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000325 ":launcher-src",
326 ":launcher-quickstep-src",
327 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700328 ],
Thales Limac335ad22021-11-08 15:31:49 +0000329 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700330 libs: [
331 "framework-statsd",
332 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000333 // Note the ordering here is important when it comes to resource
334 // overriding. We want the most specific resource overrides defined
335 // in QuickstepResLib to take precendece, so it should be the final
336 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700337 static_libs: [
338 "SystemUI-statsd",
339 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000340 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000341 "QuickstepResLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000342 "animationlib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700343 ],
344 manifest: "quickstep/AndroidManifest.xml",
345 platform_apis: true,
346 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800347 // TODO(b/319712088): re-enable use_resource_processor
348 use_resource_processor: false,
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700349}
Thales Lima813834a2022-05-18 15:29:59 +0000350
351// Build rule for Launcher3 Go app for Android Go devices.
352android_app {
353 name: "Launcher3Go",
354
355 static_libs: ["Launcher3CommonDepsLib"],
356
357 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000358 ":launcher-src",
359 ":launcher-go-src",
360 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000361 ],
362
363 resource_dirs: ["go/res"],
364
365 optimize: {
366 proguard_flags_files: ["proguard.flags"],
367 },
368
369 sdk_version: "current",
370 min_sdk_version: "current",
371 target_sdk_version: "current",
372 privileged: true,
373 system_ext_specific: true,
374 overrides: [
375 "Home",
376 "Launcher2",
377 "Launcher3",
378 "Launcher3QuickStep",
379 ],
380 required: ["privapp_whitelist_com.android.launcher3"],
381
382 additional_manifests: [
383 "AndroidManifest.xml",
384 "AndroidManifest-common.xml",
385 ],
386
387 manifest: "go/AndroidManifest.xml",
388 jacoco: {
389 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800390 },
Thales Lima813834a2022-05-18 15:29:59 +0000391
392}
393
394// Build rule for Quickstep app.
395android_app {
396 name: "Launcher3QuickStep",
397
398 static_libs: ["Launcher3QuickStepLib"],
399 optimize: {
400 enabled: false,
401 },
402
403 platform_apis: true,
404 min_sdk_version: "current",
405 target_sdk_version: "current",
406
407 privileged: true,
408 system_ext_specific: true,
409 overrides: [
410 "Home",
411 "Launcher2",
412 "Launcher3",
413 ],
414 required: ["privapp_whitelist_com.android.launcher3"],
415
416 resource_dirs: ["quickstep/res"],
417
418 additional_manifests: [
419 "quickstep/AndroidManifest-launcher.xml",
420 "AndroidManifest-common.xml",
421 ],
422
423 manifest: "quickstep/AndroidManifest.xml",
424 jacoco: {
425 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800426 },
Thales Lima813834a2022-05-18 15:29:59 +0000427
428}
429
430// Build rule for Launcher3 Go app with quickstep for Android Go devices.
431android_app {
432 name: "Launcher3QuickStepGo",
433
434 static_libs: [
435 "SystemUI-statsd",
436 "SystemUISharedLib",
437 "LauncherGoResLib",
438 ],
439
440 platform_apis: true,
441 min_sdk_version: "current",
442 target_sdk_version: "current",
443
Cole Faustbad33e62023-12-20 11:57:04 -0800444 srcs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000445
446 resource_dirs: [
447 "go/quickstep/res",
448 "go/res",
449 "quickstep/res",
450 ],
451
452 optimize: {
453 proguard_flags_files: ["proguard.flags"],
454 enabled: true,
455 },
456
457 privileged: true,
458 system_ext_specific: true,
459 overrides: [
460 "Home",
461 "Launcher2",
462 "Launcher3",
463 "Launcher3QuickStep",
464 ],
465 required: ["privapp_whitelist_com.android.launcher3"],
466
467 additional_manifests: [
468 "go/AndroidManifest.xml",
469 "go/AndroidManifest-launcher.xml",
470 "AndroidManifest-common.xml",
471 ],
472
473 manifest: "quickstep/AndroidManifest.xml",
474 jacoco: {
475 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800476 },
Thales Lima813834a2022-05-18 15:29:59 +0000477
478}