blob: 10ed01fa0b70182252111205b6fb9ef9596681d1 [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}
Bob Badour4bdf3802021-02-12 17:08:17 -080032
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 Faustbad33e62023-12-20 11:57:04 -080069 ],
Cole Faustcfa4fe72024-10-28 12:20:53 -070070 device_common_srcs: [
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040071 ":launcher-quickstep-processed-protolog-src",
Thales Lima2c54bbf2022-07-12 15:45:10 +000072 ],
73}
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,
Thales Lima2c54bbf2022-07-12 15:45:10 +0000135}
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",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000392 "launcher-testing-shared",
Uwais Ashraf6e9927e2024-03-25 10:53:06 +0000393 "androidx.lifecycle_lifecycle-common-java8",
394 "androidx.lifecycle_lifecycle-extensions",
395 "androidx.lifecycle_lifecycle-runtime-ktx",
396 "kotlinx_coroutines_android",
397 "kotlinx_coroutines",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700398 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700399 "com_android_wm_shell_flags_lib",
maxwen8fd65a52022-11-18 16:17:14 +0100400 "OmniPreferenceTheme",
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: {
Cole Faustc778a672024-01-10 12:30:39 -0800455 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000456 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800457}
458
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800459// Library with all the dependencies for building quickstep
460android_library {
461 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800462 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800463 resource_dirs: [
464 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800465 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700466 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000467 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700468 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800469 static_libs: [
470 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800471 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800472 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000473 "SettingsLibSettingsTheme",
Anushree Ganjambd863312024-08-23 17:15:30 -0700474 "dagger2",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400475 "protolog-group",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800476 ],
477 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700478 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800479}
480
Sunny Goyal77954ba2024-03-25 11:53:17 -0700481// Library with all the source code and dependencies for building Launcher Go
Jon Spivacka65d68b2021-04-07 10:22:25 -0700482android_library {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700483 name: "Launcher3GoLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100484 defaults: [
485 "launcher_compose_defaults",
486 "quickstep_compose_defaults",
487 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700488 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000489 ":launcher-src",
490 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700491 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700492 "go/quickstep/src/**/*.java",
493 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700494 ],
495 resource_dirs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700496 "go/quickstep/res",
497 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000498 // Note the ordering here is important when it comes to resource
499 // overriding. We want the most specific resource overrides defined
500 // in QuickstepResLib to take precendece, so it should be the final
501 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700502 static_libs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700503 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700504 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700505 ],
Anushree Ganjambd863312024-08-23 17:15:30 -0700506 plugins: [
507 "androidx.room_room-compiler-plugin",
508 "dagger2-compiler",
509 ],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530510 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700511 additional_manifests: [
512 "go/AndroidManifest.xml",
513 "AndroidManifest-common.xml",
514 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700515 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800516 // TODO(b/319712088): re-enable use_resource_processor
517 use_resource_processor: false,
Jon Spivacka65d68b2021-04-07 10:22:25 -0700518}
519
Sunny Goyal77954ba2024-03-25 11:53:17 -0700520// Library with all the source code and dependencies for building Quickstep
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700521android_library {
Thecrazyskullb6775e62017-02-11 18:45:26 -0500522 name: "Launcher3QuickStepLibGoogle",
Jordan Silva4afa1952024-08-06 16:54:59 +0100523 defaults: [
524 "launcher_compose_defaults",
Anushree Ganjambd863312024-08-23 17:15:30 -0700525 "quickstep_compose_defaults",
Jordan Silva4afa1952024-08-06 16:54:59 +0100526 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700527 srcs: [
Thecrazyskullb6775e62017-02-11 18:45:26 -0500528 "src_overlay/google/com/android/launcher3/overlay/OverlayCallbackImpl.java",
Thales Lima2c54bbf2022-07-12 15:45:10 +0000529 ":launcher-src",
530 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700531 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700532 ":launcher-build-config",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700533 ],
Thales Limac335ad22021-11-08 15:31:49 +0000534 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700535 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000536 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700537 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000538 // Note the ordering here is important when it comes to resource
539 // overriding. We want the most specific resource overrides defined
540 // in QuickstepResLib to take precendece, so it should be the final
541 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700542 static_libs: [
Thecrazyskullb6775e62017-02-11 18:45:26 -0500543 "OmniLib",
544 "//vendor/omni:libGoogleFeed",
545 "SystemUI-statsd",
546 "QuickstepResLib",
547 ],
548 manifest: "quickstep/AndroidManifest.xml",
549 platform_apis: true,
micky3879d1eaac2024-12-09 19:25:42 -0500550 plugins: ["dagger2-compiler"],
Thecrazyskullb6775e62017-02-11 18:45:26 -0500551 min_sdk_version: "current",
552 // TODO(b/319712088): re-enable use_resource_processor
553 use_resource_processor: false,
554}
555
556android_library {
557 name: "Launcher3QuickStepLibMock",
micky3879d1eaac2024-12-09 19:25:42 -0500558 defaults: [
559 "launcher_compose_defaults",
560 "quickstep_compose_defaults",
561 ],
Thecrazyskullb6775e62017-02-11 18:45:26 -0500562 srcs: [
563 "src_overlay/mock/com/android/launcher3/overlay/OverlayCallbackImpl.java",
564 "src_overlay/mock/com/google/android/libraries/gsa/launcherclient/LauncherClientCallbacks.java",
565 ":launcher-src",
566 ":launcher-quickstep-src",
micky3879d1eaac2024-12-09 19:25:42 -0500567 ":launcher-quickstep-dagger",
Thecrazyskullb6775e62017-02-11 18:45:26 -0500568 ":launcher-build-config",
569 ],
570 resource_dirs: [],
571 libs: [
micky3879d1eaac2024-12-09 19:25:42 -0500572 "framework-statsd.stubs.module_lib",
Thecrazyskullb6775e62017-02-11 18:45:26 -0500573 ],
574 // Note the ordering here is important when it comes to resource
575 // overriding. We want the most specific resource overrides defined
576 // in QuickstepResLib to take precendece, so it should be the final
577 // dependency. See b/208647810 for how this can go wrong.
578 static_libs: [
579 "OmniLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700580 "SystemUI-statsd",
Ben Murdochfabc8732021-12-02 18:22:17 +0000581 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700582 ],
583 manifest: "quickstep/AndroidManifest.xml",
584 platform_apis: true,
Anushree Ganjambd863312024-08-23 17:15:30 -0700585 plugins: ["dagger2-compiler"],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700586 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800587 // TODO(b/319712088): re-enable use_resource_processor
588 use_resource_processor: false,
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700589}
Thales Lima813834a2022-05-18 15:29:59 +0000590
Thales Lima813834a2022-05-18 15:29:59 +0000591// Build rule for Quickstep app.
592android_app {
593 name: "Launcher3QuickStep",
Thecrazyskullb6775e62017-02-11 18:45:26 -0500594 defaults: ["omni_launcher3_defaults"],
Thales Lima813834a2022-05-18 15:29:59 +0000595 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000596 proguard_flags_files: [":launcher-proguard-rules"],
597 enabled: true,
598 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000599 },
600
601 platform_apis: true,
602 min_sdk_version: "current",
603 target_sdk_version: "current",
604
605 privileged: true,
606 system_ext_specific: true,
607 overrides: [
608 "Home",
609 "Launcher2",
610 "Launcher3",
611 ],
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400612 required: [
613 "privapp_whitelist_com.android.launcher3",
614 "launcher.quickstep.protolog.pb",
615 ],
Thales Lima813834a2022-05-18 15:29:59 +0000616
617 resource_dirs: ["quickstep/res"],
618
619 additional_manifests: [
620 "quickstep/AndroidManifest-launcher.xml",
621 "AndroidManifest-common.xml",
622 ],
623
624 manifest: "quickstep/AndroidManifest.xml",
625 jacoco: {
626 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800627 },
Thales Lima813834a2022-05-18 15:29:59 +0000628
629}
630
Sunny Goyal77954ba2024-03-25 11:53:17 -0700631// Build rule for Launcher3 Go app with quickstep for Android Go devices.
632// Note that the following two rules are exactly same, and should
633// eventually be merged into a single target
634android_app {
635 name: "Launcher3Go",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700636 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000637 resource_dirs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000638
639 platform_apis: true,
640 min_sdk_version: "current",
641 target_sdk_version: "current",
642
Thales Lima813834a2022-05-18 15:29:59 +0000643 optimize: {
644 proguard_flags_files: ["proguard.flags"],
645 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000646 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000647 },
648
649 privileged: true,
650 system_ext_specific: true,
651 overrides: [
652 "Home",
653 "Launcher2",
654 "Launcher3",
655 "Launcher3QuickStep",
656 ],
657 required: ["privapp_whitelist_com.android.launcher3"],
658
659 additional_manifests: [
660 "go/AndroidManifest.xml",
661 "go/AndroidManifest-launcher.xml",
662 "AndroidManifest-common.xml",
663 ],
664
665 manifest: "quickstep/AndroidManifest.xml",
666 jacoco: {
667 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800668 },
Sunny Goyal77954ba2024-03-25 11:53:17 -0700669}
Anushree Ganjambd863312024-08-23 17:15:30 -0700670
Sunny Goyal77954ba2024-03-25 11:53:17 -0700671android_app {
672 name: "Launcher3QuickStepGo",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700673 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000674 resource_dirs: [],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700675
676 platform_apis: true,
677 min_sdk_version: "current",
678 target_sdk_version: "current",
679
680 optimize: {
681 proguard_flags_files: ["proguard.flags"],
682 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000683 shrink_resources: true,
Sunny Goyal77954ba2024-03-25 11:53:17 -0700684 },
685
686 privileged: true,
687 system_ext_specific: true,
688 overrides: [
689 "Home",
690 "Launcher2",
691 "Launcher3",
692 "Launcher3QuickStep",
693 ],
694 required: ["privapp_whitelist_com.android.launcher3"],
695
696 additional_manifests: [
697 "go/AndroidManifest.xml",
698 "go/AndroidManifest-launcher.xml",
699 "AndroidManifest-common.xml",
700 ],
701
702 manifest: "quickstep/AndroidManifest.xml",
703 jacoco: {
704 include_filter: ["com.android.launcher3.*"],
705 },
Thales Lima813834a2022-05-18 15:29:59 +0000706}