blob: 5dac764fc661e3f64cfcae9a8b674c7eec244ab1 [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",
Brandon Dayauonaa39acc2025-02-28 21:51:33 +000028 "android.multiuser.flags-aconfig-java",
Jared Duke1222dd72024-07-12 00:01:11 +000029 "android.appwidget.flags-aconfig-java",
30 "com.android.window.flags.window-aconfig-java",
Anushree Ganjambd863312024-08-23 17:15:30 -070031 ],
Jared Duke1222dd72024-07-12 00:01:11 +000032}
Bob Badour4bdf3802021-02-12 17:08:17 -080033
Thales Lima2c54bbf2022-07-12 15:45:10 +000034// Common source files used to build launcher (java and kotlin)
35// All sources are split so they can be reused in many other libraries/apps in other folders
Sunny Goyal77954ba2024-03-25 11:53:17 -070036
37// Main Launcher source, excluding the build config
Thales Lima2c54bbf2022-07-12 15:45:10 +000038filegroup {
39 name: "launcher-src",
Cole Faustbad33e62023-12-20 11:57:04 -080040 srcs: [
41 "src/**/*.java",
42 "src/**/*.kt",
43 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000044}
45
Jordan Silva4afa1952024-08-06 16:54:59 +010046// Main Launcher source for compose, excluding the build config
47filegroup {
48 name: "launcher-compose-enabled-src",
49 srcs: [
50 "compose/facade/enabled/*.kt",
51 "compose/facade/core/*.kt",
52 "compose/features/**/*.kt",
53 ],
54}
55
56filegroup {
57 name: "launcher-compose-disabled-src",
58 srcs: [
59 "compose/facade/core/*.kt",
60 "compose/facade/disabled/*.kt",
61 ],
62}
63
Sunny Goyal77954ba2024-03-25 11:53:17 -070064// Source code for quickstep build, on top of launcher-src
Thales Lima2c54bbf2022-07-12 15:45:10 +000065filegroup {
66 name: "launcher-quickstep-src",
Cole Faustbad33e62023-12-20 11:57:04 -080067 srcs: [
Cole Faustbad33e62023-12-20 11:57:04 -080068 "quickstep/src/**/*.kt",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040069 "quickstep/src/**/*.java",
Cole Faustbad33e62023-12-20 11:57:04 -080070 ],
Cole Faustcfa4fe72024-10-28 12:20:53 -070071 device_common_srcs: [
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040072 ":launcher-quickstep-processed-protolog-src",
Thales Lima2c54bbf2022-07-12 15:45:10 +000073 ],
74}
75
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040076// Launcher ProtoLog support
77filegroup {
78 name: "launcher-quickstep-unprocessed-protolog-src",
79 srcs: [
80 "quickstep/src_protolog/**/*.java",
81 ],
82}
83
84java_library {
85 name: "launcher-quickstep_protolog-groups",
86 srcs: [
87 "quickstep/src_protolog/**/*.java",
88 ],
89 static_libs: [
90 "protolog-group",
91 "androidx.annotation_annotation",
92 "com_android_launcher3_flags_lib",
93 ],
94}
95
Cole Faustcfa4fe72024-10-28 12:20:53 -070096java_genrule {
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040097 name: "launcher-quickstep-processed-protolog-src",
98 srcs: [
99 ":protolog-impl",
100 ":launcher-quickstep-unprocessed-protolog-src",
101 ":launcher-quickstep_protolog-groups",
102 ],
103 tools: ["protologtool"],
104 cmd: "$(location protologtool) transform-protolog-calls " +
105 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
106 "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
107 "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
108 "--viewer-config-file-path /system_ext/etc/launcher.quickstep.protolog.pb " +
109 "--output-srcjar $(out) " +
110 "$(locations :launcher-quickstep-unprocessed-protolog-src)",
111 out: ["launcher.quickstep.protolog.srcjar"],
112}
113
Cole Faustcfa4fe72024-10-28 12:20:53 -0700114java_genrule {
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400115 name: "gen-launcher.quickstep.protolog.pb",
116 srcs: [
117 ":launcher-quickstep-unprocessed-protolog-src",
118 ":launcher-quickstep_protolog-groups",
119 ],
120 tools: ["protologtool"],
121 cmd: "$(location protologtool) generate-viewer-config " +
122 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
123 "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
124 "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
125 "--viewer-config-type proto " +
126 "--viewer-config $(out) " +
127 "$(locations :launcher-quickstep-unprocessed-protolog-src)",
128 out: ["launcher.quickstep.protolog.pb"],
129}
130
131prebuilt_etc {
132 name: "launcher.quickstep.protolog.pb",
133 system_ext_specific: true,
134 src: ":gen-launcher.quickstep.protolog.pb",
135 filename_from_src: true,
Thales Lima2c54bbf2022-07-12 15:45:10 +0000136}
137
Anushree Ganjam14721d12024-08-29 10:05:12 -0700138// Source code for quickstep dagger
139filegroup {
140 name: "launcher-quickstep-dagger",
141 srcs: [
142 "quickstep/dagger/**/*.java",
143 "quickstep/dagger/**/*.kt",
144 ],
145}
146
Jordan Silva4afa1952024-08-06 16:54:59 +0100147// Source code for quickstep build with compose enabled, on top of launcher-src
148filegroup {
149 name: "launcher-quickstep-compose-enabled-src",
150 srcs: [
151 "quickstep/compose/facade/core/*.kt",
152 "quickstep/compose/facade/enabled/*.kt",
153 "quickstep/compose/features/**/*.kt",
154 ],
155}
156
157filegroup {
158 name: "launcher-quickstep-compose-disabled-src",
159 srcs: [
160 "quickstep/compose/facade/core/*.kt",
161 "quickstep/compose/facade/disabled/*.kt",
162 ],
163}
164
Sunny Goyal77954ba2024-03-25 11:53:17 -0700165// Alternate source when quickstep is not included
Thales Lima2c54bbf2022-07-12 15:45:10 +0000166filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700167 name: "launcher-src_no_quickstep",
Cole Faustbad33e62023-12-20 11:57:04 -0800168 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700169 "src_no_quickstep/**/*.java",
170 "src_no_quickstep/**/*.kt",
Cole Faustbad33e62023-12-20 11:57:04 -0800171 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +0000172}
173
Sunny Goyal77954ba2024-03-25 11:53:17 -0700174// Default build config for Launcher3
Thales Lima2c54bbf2022-07-12 15:45:10 +0000175filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700176 name: "launcher-build-config",
Cole Faustbad33e62023-12-20 11:57:04 -0800177 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700178 "src_build_config/**/*.java",
Cole Faustbad33e62023-12-20 11:57:04 -0800179 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +0000180}
181
Thales Lima2c54bbf2022-07-12 15:45:10 +0000182// Proguard files for Launcher3
183filegroup {
184 name: "launcher-proguard-rules",
185 srcs: ["proguard.flags"],
186}
187
Jordan Silva4afa1952024-08-06 16:54:59 +0100188// Opt-in configuration for Launcher3 code depending on Jetpack Compose.
189soong_config_module_type {
190 name: "launcher_compose_java_defaults",
191 module_type: "java_defaults",
192 config_namespace: "ANDROID",
193 bool_variables: ["release_enable_compose_in_launcher"],
194 properties: [
195 "srcs",
196 "static_libs",
197 ],
198}
199
200// Opt-in configuration for Launcher Quickstep code depending on Jetpack Compose.
201soong_config_bool_variable {
202 name: "release_enable_compose_in_launcher",
203}
204
205soong_config_module_type {
206 name: "quickstep_compose_java_defaults",
207 module_type: "java_defaults",
208 config_namespace: "ANDROID",
209 bool_variables: ["release_enable_compose_in_launcher"],
210 properties: [
211 "srcs",
212 "static_libs",
213 ],
214}
215
216soong_config_module_type {
217 name: "launcher_compose_tests_java_defaults",
218 module_type: "java_defaults",
219 config_namespace: "ANDROID",
220 bool_variables: ["release_enable_compose_in_launcher"],
221 properties: [
222 "static_libs",
223 ],
224}
225
226launcher_compose_java_defaults {
227 name: "launcher_compose_defaults",
228 soong_config_variables: {
229 release_enable_compose_in_launcher: {
230 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700231 ":launcher-compose-enabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100232 ],
233
234 // Compose dependencies
235 static_libs: [
236 "androidx.compose.runtime_runtime",
237 "androidx.compose.material3_material3",
238 ],
239
240 // By default, Compose is disabled and we compile the ComposeFacade
241 // in compose/launcher3/facade/disabled/.
242 conditions_default: {
243 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700244 ":launcher-compose-disabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100245 ],
246 static_libs: [],
247 },
248 },
249 },
250}
251
252quickstep_compose_java_defaults {
253 name: "quickstep_compose_defaults",
254 soong_config_variables: {
255 release_enable_compose_in_launcher: {
256 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700257 ":launcher-quickstep-compose-enabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100258 ],
259
260 // Compose dependencies
261 static_libs: [
262 "androidx.compose.runtime_runtime",
263 "androidx.compose.material3_material3",
264 ],
265
266 // By default, Compose is disabled and we compile the ComposeFacade
267 // in compose/quickstep/facade/disabled/.
268 conditions_default: {
269 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700270 ":launcher-quickstep-compose-disabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100271 ],
272 static_libs: [],
273 },
274 },
275 },
276}
277
278launcher_compose_tests_java_defaults {
279 name: "launcher_compose_tests_defaults",
280 soong_config_variables: {
281 release_enable_compose_in_launcher: {
282 // Compose dependencies
283 static_libs: [
284 "androidx.compose.runtime_runtime",
285 "androidx.compose.ui_ui-test-junit4",
286 "androidx.compose.ui_ui-test-manifest",
287 ],
288
289 conditions_default: {
290 static_libs: [],
291 },
292 },
293 },
294}
295
vadimt09df0832019-03-07 14:59:30 -0800296android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700297 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700298 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000299 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700300 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700301 static_libs: [
302 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -0700303 "androidx.test.runner",
304 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700305 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -0700306 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700307 "SystemUISharedLib",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -0700308 "//frameworks/libs/systemui:animationlib",
helencheuk39a60932024-08-05 16:11:07 +0100309 "//frameworks/libs/systemui:contextualeducationlib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000310 "launcher-testing-shared",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700311 ],
312 srcs: [
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +0000313 "tests/tapl/**/*.java",
314 "tests/tapl/**/*.kt",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700315 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800316 resource_dirs: [],
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +0000317 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700318 platform_apis: true,
319}
thiruram5e1ecf62019-11-13 17:49:35 -0800320
321java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -0800322 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -0800323 srcs: [
324 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -0800325 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -0800326 ],
327 sdk_version: "current",
328 proto: {
329 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800330 local_include_dirs: [
thiruram5e1ecf62019-11-13 17:49:35 -0800331 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800332 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800333 ],
334 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800335 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800336}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800337
thiruramcbeb13d2021-01-27 14:45:58 -0800338java_library_static {
339 name: "launcher_quickstep_log_protos_lite",
340 srcs: [
341 "quickstep/protos_overrides/*.proto",
342 ],
343 sdk_version: "current",
344 proto: {
345 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800346 local_include_dirs: [
thiruramcbeb13d2021-01-27 14:45:58 -0800347 "quickstep/protos_overrides",
348 ],
349 },
350 static_libs: [
Cole Faustbad33e62023-12-20 11:57:04 -0800351 "libprotobuf-java-lite",
352 "launcher_log_protos_lite",
353 ],
thiruramcbeb13d2021-01-27 14:45:58 -0800354}
355
Hyunyoung Song8605be32020-02-21 14:52:25 -0800356java_library {
357 name: "LauncherPluginLib",
358
359 static_libs: ["PluginCoreLib"],
360
361 srcs: ["src_plugins/**/*.java"],
362
363 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700364 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800365}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800366
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800367// Library with all the dependencies for building Launcher3
368android_library {
369 name: "Launcher3ResLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100370 defaults: [
371 "launcher_compose_defaults",
372 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800373 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800374 resource_dirs: ["res"],
375 static_libs: [
376 "LauncherPluginLib",
377 "launcher_quickstep_log_protos_lite",
378 "androidx-constraintlayout_constraintlayout",
379 "androidx.recyclerview_recyclerview",
380 "androidx.dynamicanimation_dynamicanimation",
381 "androidx.fragment_fragment",
382 "androidx.preference_preference",
383 "androidx.slice_slice-view",
384 "androidx.cardview_cardview",
Sebastian Franco9ae40322023-10-10 10:50:28 -0700385 "androidx.window_window",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400386 "com.google.android.material_material",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -0700387 "//frameworks/libs/systemui:iconloader_base",
388 "//frameworks/libs/systemui:view_capture",
389 "//frameworks/libs/systemui:animationlib",
helencheuk39a60932024-08-05 16:11:07 +0100390 "//frameworks/libs/systemui:contextualeducationlib",
Juan Sebastian Martinez9c774c42024-11-08 08:38:11 -0800391 "//frameworks/libs/systemui:msdl",
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000392 "SystemUI-statsd",
Mady Mellor7d97e962025-01-13 10:12:43 -0800393 "WindowManager-Shell-shared-AOSP",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000394 "launcher-testing-shared",
Uwais Ashraf6e9927e2024-03-25 10:53:06 +0000395 "androidx.lifecycle_lifecycle-common-java8",
396 "androidx.lifecycle_lifecycle-extensions",
397 "androidx.lifecycle_lifecycle-runtime-ktx",
398 "kotlinx_coroutines_android",
399 "kotlinx_coroutines",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700400 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700401 "com_android_wm_shell_flags_lib",
maxwen8fd65a52022-11-18 16:17:14 +0100402 "OmniPreferenceTheme",
Anushree Ganjambd863312024-08-23 17:15:30 -0700403 "dagger2",
404 "jsr330",
George Linde4d7452024-08-27 16:57:32 +0000405 "com_android_systemui_shared_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000406 ],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700407 manifest: "AndroidManifest-common.xml",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800408 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700409 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000410 lint: {
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700411 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000412 },
Stefan Andonianae799cc2025-03-12 18:17:04 +0000413 flags_packages: [
414 "com_android_launcher3_flags",
415 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800416}
417
418//
419// Build rule for Launcher3 app.
420//
421android_app {
422 name: "Launcher3",
Jared Duke1222dd72024-07-12 00:01:11 +0000423 defaults: ["launcher-non-platform-apis-defaults"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800424
425 static_libs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700426 "Launcher3ResLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800427 ],
428 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000429 ":launcher-src",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700430 ":launcher-src_no_quickstep",
431 ":launcher-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800432 ],
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700433
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800434 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000435 proguard_flags_files: [":launcher-proguard-rules"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800436 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
437 enabled: false,
438 },
439
440 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700441 min_sdk_version: min_launcher3_sdk_version,
442 target_sdk_version: "current",
Anushree Ganjambd863312024-08-23 17:15:30 -0700443 plugins: ["dagger2-compiler"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800444 privileged: true,
445 system_ext_specific: true,
446
447 overrides: [
448 "Home",
449 "Launcher2",
450 ],
451 required: ["privapp_whitelist_com.android.launcher3"],
452
453 jacoco: {
454 include_filter: ["com.android.launcher3.**"],
455 },
456 additional_manifests: [
457 "AndroidManifest-common.xml",
458 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000459 lint: {
Adnan Begovica6102852025-01-28 14:51:25 -0800460 extra_check_modules: ["Launcher3LintChecker"],
Cole Faustc778a672024-01-10 12:30:39 -0800461 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000462 },
Sunny Goyal3fd385c2025-02-19 15:45:59 -0800463 kotlincflags: [
464 "-Xjvm-default=all",
465 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800466}
467
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800468// Library with all the dependencies for building quickstep
469android_library {
470 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800471 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800472 resource_dirs: [
473 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800474 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700475 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000476 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700477 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800478 static_libs: [
479 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800480 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800481 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000482 "SettingsLibSettingsTheme",
Anushree Ganjambd863312024-08-23 17:15:30 -0700483 "dagger2",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400484 "protolog-group",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800485 ],
486 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700487 min_sdk_version: "current",
Sam Cackett65936222024-12-10 16:39:36 +0000488 lint: {
489 disabled_checks: ["MissingClass"],
490 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800491}
492
Sunny Goyal77954ba2024-03-25 11:53:17 -0700493// Library with all the source code and dependencies for building Launcher Go
Jon Spivacka65d68b2021-04-07 10:22:25 -0700494android_library {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700495 name: "Launcher3GoLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100496 defaults: [
497 "launcher_compose_defaults",
498 "quickstep_compose_defaults",
499 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700500 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000501 ":launcher-src",
502 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700503 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700504 "go/quickstep/src/**/*.java",
505 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700506 ],
507 resource_dirs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700508 "go/quickstep/res",
509 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000510 // Note the ordering here is important when it comes to resource
511 // overriding. We want the most specific resource overrides defined
512 // in QuickstepResLib to take precendece, so it should be the final
513 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700514 static_libs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700515 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700516 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700517 ],
Anushree Ganjambd863312024-08-23 17:15:30 -0700518 plugins: [
519 "androidx.room_room-compiler-plugin",
520 "dagger2-compiler",
521 ],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530522 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700523 additional_manifests: [
524 "go/AndroidManifest.xml",
525 "AndroidManifest-common.xml",
526 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700527 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800528 // TODO(b/319712088): re-enable use_resource_processor
529 use_resource_processor: false,
Sunny Goyal3fd385c2025-02-19 15:45:59 -0800530 kotlincflags: [
531 "-Xjvm-default=all",
532 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700533}
534
Sunny Goyal77954ba2024-03-25 11:53:17 -0700535// Library with all the source code and dependencies for building Quickstep
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700536android_library {
Thecrazyskullb6775e62017-02-11 18:45:26 -0500537 name: "Launcher3QuickStepLibGoogle",
Jordan Silva4afa1952024-08-06 16:54:59 +0100538 defaults: [
539 "launcher_compose_defaults",
Anushree Ganjambd863312024-08-23 17:15:30 -0700540 "quickstep_compose_defaults",
Jordan Silva4afa1952024-08-06 16:54:59 +0100541 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700542 srcs: [
Thecrazyskullb6775e62017-02-11 18:45:26 -0500543 "src_overlay/google/com/android/launcher3/overlay/OverlayCallbackImpl.java",
Thales Lima2c54bbf2022-07-12 15:45:10 +0000544 ":launcher-src",
545 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700546 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700547 ":launcher-build-config",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700548 ],
Thales Limac335ad22021-11-08 15:31:49 +0000549 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700550 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000551 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700552 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000553 // Note the ordering here is important when it comes to resource
554 // overriding. We want the most specific resource overrides defined
555 // in QuickstepResLib to take precendece, so it should be the final
556 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700557 static_libs: [
Thecrazyskullb6775e62017-02-11 18:45:26 -0500558 "OmniLib",
559 "//vendor/omni:libGoogleFeed",
560 "SystemUI-statsd",
561 "QuickstepResLib",
562 ],
563 manifest: "quickstep/AndroidManifest.xml",
564 platform_apis: true,
micky3879d1eaac2024-12-09 19:25:42 -0500565 plugins: ["dagger2-compiler"],
Thecrazyskullb6775e62017-02-11 18:45:26 -0500566 min_sdk_version: "current",
567 // TODO(b/319712088): re-enable use_resource_processor
568 use_resource_processor: false,
569}
570
571android_library {
572 name: "Launcher3QuickStepLibMock",
micky3879d1eaac2024-12-09 19:25:42 -0500573 defaults: [
574 "launcher_compose_defaults",
575 "quickstep_compose_defaults",
576 ],
Thecrazyskullb6775e62017-02-11 18:45:26 -0500577 srcs: [
578 "src_overlay/mock/com/android/launcher3/overlay/OverlayCallbackImpl.java",
579 "src_overlay/mock/com/google/android/libraries/gsa/launcherclient/LauncherClientCallbacks.java",
580 ":launcher-src",
581 ":launcher-quickstep-src",
micky3879d1eaac2024-12-09 19:25:42 -0500582 ":launcher-quickstep-dagger",
Thecrazyskullb6775e62017-02-11 18:45:26 -0500583 ":launcher-build-config",
584 ],
585 resource_dirs: [],
586 libs: [
micky3879d1eaac2024-12-09 19:25:42 -0500587 "framework-statsd.stubs.module_lib",
Thecrazyskullb6775e62017-02-11 18:45:26 -0500588 ],
589 // Note the ordering here is important when it comes to resource
590 // overriding. We want the most specific resource overrides defined
591 // in QuickstepResLib to take precendece, so it should be the final
592 // dependency. See b/208647810 for how this can go wrong.
593 static_libs: [
594 "OmniLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700595 "SystemUI-statsd",
Ben Murdochfabc8732021-12-02 18:22:17 +0000596 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700597 ],
598 manifest: "quickstep/AndroidManifest.xml",
599 platform_apis: true,
Anushree Ganjambd863312024-08-23 17:15:30 -0700600 plugins: ["dagger2-compiler"],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700601 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800602 // TODO(b/319712088): re-enable use_resource_processor
603 use_resource_processor: false,
Sunny Goyal3fd385c2025-02-19 15:45:59 -0800604 kotlincflags: [
605 "-Xjvm-default=all",
606 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700607}
Thales Lima813834a2022-05-18 15:29:59 +0000608
Thales Lima813834a2022-05-18 15:29:59 +0000609// Build rule for Quickstep app.
610android_app {
611 name: "Launcher3QuickStep",
Thecrazyskullb6775e62017-02-11 18:45:26 -0500612 defaults: ["omni_launcher3_defaults"],
Thales Lima813834a2022-05-18 15:29:59 +0000613 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000614 proguard_flags_files: [":launcher-proguard-rules"],
615 enabled: true,
616 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000617 },
618
619 platform_apis: true,
620 min_sdk_version: "current",
621 target_sdk_version: "current",
622
623 privileged: true,
624 system_ext_specific: true,
625 overrides: [
626 "Home",
627 "Launcher2",
628 "Launcher3",
629 ],
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400630 required: [
631 "privapp_whitelist_com.android.launcher3",
632 "launcher.quickstep.protolog.pb",
633 ],
Thales Lima813834a2022-05-18 15:29:59 +0000634
635 resource_dirs: ["quickstep/res"],
636
637 additional_manifests: [
638 "quickstep/AndroidManifest-launcher.xml",
639 "AndroidManifest-common.xml",
640 ],
641
642 manifest: "quickstep/AndroidManifest.xml",
643 jacoco: {
644 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800645 },
Thales Lima813834a2022-05-18 15:29:59 +0000646
647}
648
Sunny Goyal77954ba2024-03-25 11:53:17 -0700649// Build rule for Launcher3 Go app with quickstep for Android Go devices.
650// Note that the following two rules are exactly same, and should
651// eventually be merged into a single target
652android_app {
653 name: "Launcher3Go",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700654 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000655 resource_dirs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000656
657 platform_apis: true,
658 min_sdk_version: "current",
659 target_sdk_version: "current",
660
Thales Lima813834a2022-05-18 15:29:59 +0000661 optimize: {
662 proguard_flags_files: ["proguard.flags"],
663 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000664 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000665 },
666
667 privileged: true,
668 system_ext_specific: true,
669 overrides: [
670 "Home",
671 "Launcher2",
672 "Launcher3",
673 "Launcher3QuickStep",
674 ],
675 required: ["privapp_whitelist_com.android.launcher3"],
676
677 additional_manifests: [
678 "go/AndroidManifest.xml",
679 "go/AndroidManifest-launcher.xml",
680 "AndroidManifest-common.xml",
681 ],
682
683 manifest: "quickstep/AndroidManifest.xml",
684 jacoco: {
685 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800686 },
Sunny Goyal77954ba2024-03-25 11:53:17 -0700687}
Anushree Ganjambd863312024-08-23 17:15:30 -0700688
Sunny Goyal77954ba2024-03-25 11:53:17 -0700689android_app {
690 name: "Launcher3QuickStepGo",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700691 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000692 resource_dirs: [],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700693
694 platform_apis: true,
695 min_sdk_version: "current",
696 target_sdk_version: "current",
697
698 optimize: {
699 proguard_flags_files: ["proguard.flags"],
700 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000701 shrink_resources: true,
Sunny Goyal77954ba2024-03-25 11:53:17 -0700702 },
703
704 privileged: true,
705 system_ext_specific: true,
706 overrides: [
707 "Home",
708 "Launcher2",
709 "Launcher3",
710 "Launcher3QuickStep",
711 ],
712 required: ["privapp_whitelist_com.android.launcher3"],
713
714 additional_manifests: [
715 "go/AndroidManifest.xml",
716 "go/AndroidManifest-launcher.xml",
717 "AndroidManifest-common.xml",
718 ],
719
720 manifest: "quickstep/AndroidManifest.xml",
721 jacoco: {
722 include_filter: ["com.android.launcher3.*"],
723 },
Thales Lima813834a2022-05-18 15:29:59 +0000724}