blob: a4a058fce09094e33d1b9459753e9e4408a97e2e [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 Goyal621918f2024-09-18 11:31:58 -070020min_launcher3_sdk_version = "31"
Sunny Goyal1fb271f2021-05-20 10:43:23 -070021
Jared Duke1222dd72024-07-12 00:01:11 +000022// Targets that don't inherit framework aconfig libs (i.e., those that don't set
23// `platform_apis: true`) must manually link them.
24java_defaults {
25 name: "launcher-non-platform-apis-defaults",
26 static_libs: [
27 "android.os.flags-aconfig-java",
28 "android.appwidget.flags-aconfig-java",
29 "com.android.window.flags.window-aconfig-java",
Anushree Ganjambd863312024-08-23 17:15:30 -070030 ],
Jared Duke1222dd72024-07-12 00:01:11 +000031}
32
Thales Lima2c54bbf2022-07-12 15:45:10 +000033// Common source files used to build launcher (java and kotlin)
34// All sources are split so they can be reused in many other libraries/apps in other folders
Sunny Goyal77954ba2024-03-25 11:53:17 -070035
36// Main Launcher source, excluding the build config
Thales Lima2c54bbf2022-07-12 15:45:10 +000037filegroup {
38 name: "launcher-src",
Cole Faustbad33e62023-12-20 11:57:04 -080039 srcs: [
40 "src/**/*.java",
41 "src/**/*.kt",
42 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000043}
44
Jordan Silva4afa1952024-08-06 16:54:59 +010045// Main Launcher source for compose, excluding the build config
46filegroup {
47 name: "launcher-compose-enabled-src",
48 srcs: [
49 "compose/facade/enabled/*.kt",
50 "compose/facade/core/*.kt",
51 "compose/features/**/*.kt",
52 ],
53}
54
55filegroup {
56 name: "launcher-compose-disabled-src",
57 srcs: [
58 "compose/facade/core/*.kt",
59 "compose/facade/disabled/*.kt",
60 ],
61}
62
Sunny Goyal77954ba2024-03-25 11:53:17 -070063// Source code for quickstep build, on top of launcher-src
Thales Lima2c54bbf2022-07-12 15:45:10 +000064filegroup {
65 name: "launcher-quickstep-src",
Cole Faustbad33e62023-12-20 11:57:04 -080066 srcs: [
Cole Faustbad33e62023-12-20 11:57:04 -080067 "quickstep/src/**/*.kt",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040068 "quickstep/src/**/*.java",
Cole Faustcfa4fe72024-10-28 12:20:53 -070069 ],
70 device_common_srcs: [
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040071 ":launcher-quickstep-processed-protolog-src",
Cole Faustbad33e62023-12-20 11:57:04 -080072 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000073}
74
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040075// Launcher ProtoLog support
76filegroup {
77 name: "launcher-quickstep-unprocessed-protolog-src",
78 srcs: [
79 "quickstep/src_protolog/**/*.java",
80 ],
81}
82
83java_library {
84 name: "launcher-quickstep_protolog-groups",
85 srcs: [
86 "quickstep/src_protolog/**/*.java",
87 ],
88 static_libs: [
89 "protolog-group",
90 "androidx.annotation_annotation",
91 "com_android_launcher3_flags_lib",
92 ],
93}
94
Cole Faustcfa4fe72024-10-28 12:20:53 -070095java_genrule {
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040096 name: "launcher-quickstep-processed-protolog-src",
97 srcs: [
98 ":protolog-impl",
99 ":launcher-quickstep-unprocessed-protolog-src",
100 ":launcher-quickstep_protolog-groups",
101 ],
102 tools: ["protologtool"],
103 cmd: "$(location protologtool) transform-protolog-calls " +
104 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
105 "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
106 "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
107 "--viewer-config-file-path /system_ext/etc/launcher.quickstep.protolog.pb " +
108 "--output-srcjar $(out) " +
109 "$(locations :launcher-quickstep-unprocessed-protolog-src)",
110 out: ["launcher.quickstep.protolog.srcjar"],
111}
112
Cole Faustcfa4fe72024-10-28 12:20:53 -0700113java_genrule {
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400114 name: "gen-launcher.quickstep.protolog.pb",
115 srcs: [
116 ":launcher-quickstep-unprocessed-protolog-src",
117 ":launcher-quickstep_protolog-groups",
118 ],
119 tools: ["protologtool"],
120 cmd: "$(location protologtool) generate-viewer-config " +
121 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
122 "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
123 "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
124 "--viewer-config-type proto " +
125 "--viewer-config $(out) " +
126 "$(locations :launcher-quickstep-unprocessed-protolog-src)",
127 out: ["launcher.quickstep.protolog.pb"],
128}
129
130prebuilt_etc {
131 name: "launcher.quickstep.protolog.pb",
132 system_ext_specific: true,
133 src: ":gen-launcher.quickstep.protolog.pb",
134 filename_from_src: true,
135}
136
Anushree Ganjam14721d12024-08-29 10:05:12 -0700137// Source code for quickstep dagger
138filegroup {
139 name: "launcher-quickstep-dagger",
140 srcs: [
141 "quickstep/dagger/**/*.java",
142 "quickstep/dagger/**/*.kt",
143 ],
144}
145
Jordan Silva4afa1952024-08-06 16:54:59 +0100146// Source code for quickstep build with compose enabled, on top of launcher-src
147filegroup {
148 name: "launcher-quickstep-compose-enabled-src",
149 srcs: [
150 "quickstep/compose/facade/core/*.kt",
151 "quickstep/compose/facade/enabled/*.kt",
152 "quickstep/compose/features/**/*.kt",
153 ],
154}
155
156filegroup {
157 name: "launcher-quickstep-compose-disabled-src",
158 srcs: [
159 "quickstep/compose/facade/core/*.kt",
160 "quickstep/compose/facade/disabled/*.kt",
161 ],
162}
163
Sunny Goyal77954ba2024-03-25 11:53:17 -0700164// Alternate source when quickstep is not included
Thales Lima2c54bbf2022-07-12 15:45:10 +0000165filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700166 name: "launcher-src_no_quickstep",
Cole Faustbad33e62023-12-20 11:57:04 -0800167 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700168 "src_no_quickstep/**/*.java",
169 "src_no_quickstep/**/*.kt",
Cole Faustbad33e62023-12-20 11:57:04 -0800170 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +0000171}
172
Sunny Goyal77954ba2024-03-25 11:53:17 -0700173// Default build config for Launcher3
Thales Lima2c54bbf2022-07-12 15:45:10 +0000174filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700175 name: "launcher-build-config",
Cole Faustbad33e62023-12-20 11:57:04 -0800176 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700177 "src_build_config/**/*.java",
Cole Faustbad33e62023-12-20 11:57:04 -0800178 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +0000179}
180
Thales Lima2c54bbf2022-07-12 15:45:10 +0000181// Proguard files for Launcher3
182filegroup {
183 name: "launcher-proguard-rules",
184 srcs: ["proguard.flags"],
185}
186
Jordan Silva4afa1952024-08-06 16:54:59 +0100187// Opt-in configuration for Launcher3 code depending on Jetpack Compose.
188soong_config_module_type {
189 name: "launcher_compose_java_defaults",
190 module_type: "java_defaults",
191 config_namespace: "ANDROID",
192 bool_variables: ["release_enable_compose_in_launcher"],
193 properties: [
194 "srcs",
195 "static_libs",
196 ],
197}
198
199// Opt-in configuration for Launcher Quickstep code depending on Jetpack Compose.
200soong_config_bool_variable {
201 name: "release_enable_compose_in_launcher",
202}
203
204soong_config_module_type {
205 name: "quickstep_compose_java_defaults",
206 module_type: "java_defaults",
207 config_namespace: "ANDROID",
208 bool_variables: ["release_enable_compose_in_launcher"],
209 properties: [
210 "srcs",
211 "static_libs",
212 ],
213}
214
215soong_config_module_type {
216 name: "launcher_compose_tests_java_defaults",
217 module_type: "java_defaults",
218 config_namespace: "ANDROID",
219 bool_variables: ["release_enable_compose_in_launcher"],
220 properties: [
221 "static_libs",
222 ],
223}
224
225launcher_compose_java_defaults {
226 name: "launcher_compose_defaults",
227 soong_config_variables: {
228 release_enable_compose_in_launcher: {
229 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700230 ":launcher-compose-enabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100231 ],
232
233 // Compose dependencies
234 static_libs: [
235 "androidx.compose.runtime_runtime",
236 "androidx.compose.material3_material3",
237 ],
238
239 // By default, Compose is disabled and we compile the ComposeFacade
240 // in compose/launcher3/facade/disabled/.
241 conditions_default: {
242 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700243 ":launcher-compose-disabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100244 ],
245 static_libs: [],
246 },
247 },
248 },
249}
250
251quickstep_compose_java_defaults {
252 name: "quickstep_compose_defaults",
253 soong_config_variables: {
254 release_enable_compose_in_launcher: {
255 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700256 ":launcher-quickstep-compose-enabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100257 ],
258
259 // Compose dependencies
260 static_libs: [
261 "androidx.compose.runtime_runtime",
262 "androidx.compose.material3_material3",
263 ],
264
265 // By default, Compose is disabled and we compile the ComposeFacade
266 // in compose/quickstep/facade/disabled/.
267 conditions_default: {
268 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700269 ":launcher-quickstep-compose-disabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100270 ],
271 static_libs: [],
272 },
273 },
274 },
275}
276
277launcher_compose_tests_java_defaults {
278 name: "launcher_compose_tests_defaults",
279 soong_config_variables: {
280 release_enable_compose_in_launcher: {
281 // Compose dependencies
282 static_libs: [
283 "androidx.compose.runtime_runtime",
284 "androidx.compose.ui_ui-test-junit4",
285 "androidx.compose.ui_ui-test-manifest",
286 ],
287
288 conditions_default: {
289 static_libs: [],
290 },
291 },
292 },
293}
294
vadimt09df0832019-03-07 14:59:30 -0800295android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700296 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700297 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000298 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700299 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700300 static_libs: [
301 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -0700302 "androidx.test.runner",
303 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700304 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -0700305 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700306 "SystemUISharedLib",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -0700307 "//frameworks/libs/systemui:animationlib",
helencheuk39a60932024-08-05 16:11:07 +0100308 "//frameworks/libs/systemui:contextualeducationlib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000309 "launcher-testing-shared",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700310 ],
311 srcs: [
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +0000312 "tests/tapl/**/*.java",
313 "tests/tapl/**/*.kt",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700314 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800315 resource_dirs: [],
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +0000316 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700317 platform_apis: true,
318}
thiruram5e1ecf62019-11-13 17:49:35 -0800319
320java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -0800321 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -0800322 srcs: [
323 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -0800324 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -0800325 ],
326 sdk_version: "current",
327 proto: {
328 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800329 local_include_dirs: [
thiruram5e1ecf62019-11-13 17:49:35 -0800330 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800331 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800332 ],
333 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800334 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800335}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800336
thiruramcbeb13d2021-01-27 14:45:58 -0800337java_library_static {
338 name: "launcher_quickstep_log_protos_lite",
339 srcs: [
340 "quickstep/protos_overrides/*.proto",
341 ],
342 sdk_version: "current",
343 proto: {
344 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800345 local_include_dirs: [
thiruramcbeb13d2021-01-27 14:45:58 -0800346 "quickstep/protos_overrides",
347 ],
348 },
349 static_libs: [
Cole Faustbad33e62023-12-20 11:57:04 -0800350 "libprotobuf-java-lite",
351 "launcher_log_protos_lite",
352 ],
thiruramcbeb13d2021-01-27 14:45:58 -0800353}
354
Hyunyoung Song8605be32020-02-21 14:52:25 -0800355java_library {
356 name: "LauncherPluginLib",
357
358 static_libs: ["PluginCoreLib"],
359
360 srcs: ["src_plugins/**/*.java"],
361
362 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700363 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800364}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800365
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800366// Library with all the dependencies for building Launcher3
367android_library {
368 name: "Launcher3ResLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100369 defaults: [
370 "launcher_compose_defaults",
371 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800372 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800373 resource_dirs: ["res"],
374 static_libs: [
375 "LauncherPluginLib",
376 "launcher_quickstep_log_protos_lite",
377 "androidx-constraintlayout_constraintlayout",
378 "androidx.recyclerview_recyclerview",
379 "androidx.dynamicanimation_dynamicanimation",
380 "androidx.fragment_fragment",
381 "androidx.preference_preference",
382 "androidx.slice_slice-view",
383 "androidx.cardview_cardview",
Sebastian Franco9ae40322023-10-10 10:50:28 -0700384 "androidx.window_window",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400385 "com.google.android.material_material",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -0700386 "//frameworks/libs/systemui:iconloader_base",
387 "//frameworks/libs/systemui:view_capture",
388 "//frameworks/libs/systemui:animationlib",
helencheuk39a60932024-08-05 16:11:07 +0100389 "//frameworks/libs/systemui:contextualeducationlib",
Juan Sebastian Martinez9c774c42024-11-08 08:38:11 -0800390 "//frameworks/libs/systemui:msdl",
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000391 "SystemUI-statsd",
Mady Mellor7d97e962025-01-13 10:12:43 -0800392 "WindowManager-Shell-shared-AOSP",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000393 "launcher-testing-shared",
Uwais Ashraf6e9927e2024-03-25 10:53:06 +0000394 "androidx.lifecycle_lifecycle-common-java8",
395 "androidx.lifecycle_lifecycle-extensions",
396 "androidx.lifecycle_lifecycle-runtime-ktx",
397 "kotlinx_coroutines_android",
398 "kotlinx_coroutines",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700399 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700400 "com_android_wm_shell_flags_lib",
Anushree Ganjambd863312024-08-23 17:15:30 -0700401 "dagger2",
402 "jsr330",
George Linde4d7452024-08-27 16:57:32 +0000403 "com_android_systemui_shared_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000404 ],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700405 manifest: "AndroidManifest-common.xml",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800406 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700407 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000408 lint: {
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700409 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000410 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800411}
412
413//
414// Build rule for Launcher3 app.
415//
416android_app {
417 name: "Launcher3",
Jared Duke1222dd72024-07-12 00:01:11 +0000418 defaults: ["launcher-non-platform-apis-defaults"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800419
420 static_libs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700421 "Launcher3ResLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800422 ],
423 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000424 ":launcher-src",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700425 ":launcher-src_no_quickstep",
426 ":launcher-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800427 ],
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700428
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800429 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000430 proguard_flags_files: [":launcher-proguard-rules"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800431 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
432 enabled: false,
433 },
434
435 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700436 min_sdk_version: min_launcher3_sdk_version,
437 target_sdk_version: "current",
Anushree Ganjambd863312024-08-23 17:15:30 -0700438 plugins: ["dagger2-compiler"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800439 privileged: true,
440 system_ext_specific: true,
441
442 overrides: [
443 "Home",
444 "Launcher2",
445 ],
446 required: ["privapp_whitelist_com.android.launcher3"],
447
448 jacoco: {
449 include_filter: ["com.android.launcher3.**"],
450 },
451 additional_manifests: [
452 "AndroidManifest-common.xml",
453 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000454 lint: {
Adnan Begovica6102852025-01-28 14:51:25 -0800455 extra_check_modules: ["Launcher3LintChecker"],
Cole Faustc778a672024-01-10 12:30:39 -0800456 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000457 },
Sunny Goyal3fd385c2025-02-19 15:45:59 -0800458 kotlincflags: [
459 "-Xjvm-default=all",
460 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800461}
462
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800463// Library with all the dependencies for building quickstep
464android_library {
465 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800466 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800467 resource_dirs: [
468 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800469 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700470 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000471 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700472 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800473 static_libs: [
474 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800475 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800476 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000477 "SettingsLibSettingsTheme",
Anushree Ganjambd863312024-08-23 17:15:30 -0700478 "dagger2",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400479 "protolog-group",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800480 ],
481 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700482 min_sdk_version: "current",
Sam Cackett65936222024-12-10 16:39:36 +0000483 lint: {
484 disabled_checks: ["MissingClass"],
485 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800486}
487
Sunny Goyal77954ba2024-03-25 11:53:17 -0700488// Library with all the source code and dependencies for building Launcher Go
Jon Spivacka65d68b2021-04-07 10:22:25 -0700489android_library {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700490 name: "Launcher3GoLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100491 defaults: [
492 "launcher_compose_defaults",
493 "quickstep_compose_defaults",
494 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700495 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000496 ":launcher-src",
497 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700498 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700499 "go/quickstep/src/**/*.java",
500 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700501 ],
502 resource_dirs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700503 "go/quickstep/res",
504 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000505 // Note the ordering here is important when it comes to resource
506 // overriding. We want the most specific resource overrides defined
507 // in QuickstepResLib to take precendece, so it should be the final
508 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700509 static_libs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700510 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700511 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700512 ],
Anushree Ganjambd863312024-08-23 17:15:30 -0700513 plugins: [
514 "androidx.room_room-compiler-plugin",
515 "dagger2-compiler",
516 ],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530517 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700518 additional_manifests: [
519 "go/AndroidManifest.xml",
520 "AndroidManifest-common.xml",
521 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700522 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800523 // TODO(b/319712088): re-enable use_resource_processor
524 use_resource_processor: false,
Sunny Goyal3fd385c2025-02-19 15:45:59 -0800525 kotlincflags: [
526 "-Xjvm-default=all",
527 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700528}
529
Sunny Goyal77954ba2024-03-25 11:53:17 -0700530// Library with all the source code and dependencies for building Quickstep
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700531android_library {
532 name: "Launcher3QuickStepLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100533 defaults: [
534 "launcher_compose_defaults",
Anushree Ganjambd863312024-08-23 17:15:30 -0700535 "quickstep_compose_defaults",
Jordan Silva4afa1952024-08-06 16:54:59 +0100536 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700537 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000538 ":launcher-src",
539 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700540 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700541 ":launcher-build-config",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700542 ],
Thales Limac335ad22021-11-08 15:31:49 +0000543 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700544 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000545 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700546 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000547 // Note the ordering here is important when it comes to resource
548 // overriding. We want the most specific resource overrides defined
549 // in QuickstepResLib to take precendece, so it should be the final
550 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700551 static_libs: [
552 "SystemUI-statsd",
Ben Murdochfabc8732021-12-02 18:22:17 +0000553 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700554 ],
555 manifest: "quickstep/AndroidManifest.xml",
556 platform_apis: true,
Anushree Ganjambd863312024-08-23 17:15:30 -0700557 plugins: ["dagger2-compiler"],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700558 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800559 // TODO(b/319712088): re-enable use_resource_processor
560 use_resource_processor: false,
Sunny Goyal3fd385c2025-02-19 15:45:59 -0800561 kotlincflags: [
562 "-Xjvm-default=all",
563 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700564}
Thales Lima813834a2022-05-18 15:29:59 +0000565
Thales Lima813834a2022-05-18 15:29:59 +0000566// Build rule for Quickstep app.
567android_app {
568 name: "Launcher3QuickStep",
Thales Lima813834a2022-05-18 15:29:59 +0000569 static_libs: ["Launcher3QuickStepLib"],
570 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000571 proguard_flags_files: [":launcher-proguard-rules"],
572 enabled: true,
573 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000574 },
575
576 platform_apis: true,
577 min_sdk_version: "current",
578 target_sdk_version: "current",
579
580 privileged: true,
581 system_ext_specific: true,
582 overrides: [
583 "Home",
584 "Launcher2",
585 "Launcher3",
586 ],
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400587 required: [
588 "privapp_whitelist_com.android.launcher3",
589 "launcher.quickstep.protolog.pb",
590 ],
Thales Lima813834a2022-05-18 15:29:59 +0000591
592 resource_dirs: ["quickstep/res"],
593
594 additional_manifests: [
595 "quickstep/AndroidManifest-launcher.xml",
596 "AndroidManifest-common.xml",
597 ],
598
599 manifest: "quickstep/AndroidManifest.xml",
600 jacoco: {
601 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800602 },
Thales Lima813834a2022-05-18 15:29:59 +0000603
604}
605
Sunny Goyal77954ba2024-03-25 11:53:17 -0700606// Build rule for Launcher3 Go app with quickstep for Android Go devices.
607// Note that the following two rules are exactly same, and should
608// eventually be merged into a single target
609android_app {
610 name: "Launcher3Go",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700611 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000612 resource_dirs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000613
614 platform_apis: true,
615 min_sdk_version: "current",
616 target_sdk_version: "current",
617
Thales Lima813834a2022-05-18 15:29:59 +0000618 optimize: {
619 proguard_flags_files: ["proguard.flags"],
620 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000621 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000622 },
623
624 privileged: true,
625 system_ext_specific: true,
626 overrides: [
627 "Home",
628 "Launcher2",
629 "Launcher3",
630 "Launcher3QuickStep",
631 ],
632 required: ["privapp_whitelist_com.android.launcher3"],
633
634 additional_manifests: [
635 "go/AndroidManifest.xml",
636 "go/AndroidManifest-launcher.xml",
637 "AndroidManifest-common.xml",
638 ],
639
640 manifest: "quickstep/AndroidManifest.xml",
641 jacoco: {
642 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800643 },
Sunny Goyal77954ba2024-03-25 11:53:17 -0700644}
Anushree Ganjambd863312024-08-23 17:15:30 -0700645
Sunny Goyal77954ba2024-03-25 11:53:17 -0700646android_app {
647 name: "Launcher3QuickStepGo",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700648 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000649 resource_dirs: [],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700650
651 platform_apis: true,
652 min_sdk_version: "current",
653 target_sdk_version: "current",
654
655 optimize: {
656 proguard_flags_files: ["proguard.flags"],
657 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000658 shrink_resources: true,
Sunny Goyal77954ba2024-03-25 11:53:17 -0700659 },
660
661 privileged: true,
662 system_ext_specific: true,
663 overrides: [
664 "Home",
665 "Launcher2",
666 "Launcher3",
667 "Launcher3QuickStep",
668 ],
669 required: ["privapp_whitelist_com.android.launcher3"],
670
671 additional_manifests: [
672 "go/AndroidManifest.xml",
673 "go/AndroidManifest-launcher.xml",
674 "AndroidManifest-common.xml",
675 ],
676
677 manifest: "quickstep/AndroidManifest.xml",
678 jacoco: {
679 include_filter: ["com.android.launcher3.*"],
680 },
Thales Lima813834a2022-05-18 15:29:59 +0000681}