blob: 85632b2b8990783d1480e568174ada0f3c797914 [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}
33
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 Faustcfa4fe72024-10-28 12:20:53 -070070 ],
71 device_common_srcs: [
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040072 ":launcher-quickstep-processed-protolog-src",
Cole Faustbad33e62023-12-20 11:57:04 -080073 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000074}
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,
136}
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",
Anushree Ganjambd863312024-08-23 17:15:30 -0700402 "dagger2",
403 "jsr330",
George Linde4d7452024-08-27 16:57:32 +0000404 "com_android_systemui_shared_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000405 ],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700406 manifest: "AndroidManifest-common.xml",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800407 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700408 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000409 lint: {
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700410 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000411 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800412}
413
414//
415// Build rule for Launcher3 app.
416//
417android_app {
418 name: "Launcher3",
Jared Duke1222dd72024-07-12 00:01:11 +0000419 defaults: ["launcher-non-platform-apis-defaults"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800420
421 static_libs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700422 "Launcher3ResLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800423 ],
424 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000425 ":launcher-src",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700426 ":launcher-src_no_quickstep",
427 ":launcher-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800428 ],
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700429
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800430 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000431 proguard_flags_files: [":launcher-proguard-rules"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800432 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
433 enabled: false,
434 },
435
436 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700437 min_sdk_version: min_launcher3_sdk_version,
438 target_sdk_version: "current",
Anushree Ganjambd863312024-08-23 17:15:30 -0700439 plugins: ["dagger2-compiler"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800440 privileged: true,
441 system_ext_specific: true,
442
443 overrides: [
444 "Home",
445 "Launcher2",
446 ],
447 required: ["privapp_whitelist_com.android.launcher3"],
448
449 jacoco: {
450 include_filter: ["com.android.launcher3.**"],
451 },
452 additional_manifests: [
453 "AndroidManifest-common.xml",
454 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000455 lint: {
Adnan Begovica6102852025-01-28 14:51:25 -0800456 extra_check_modules: ["Launcher3LintChecker"],
Cole Faustc778a672024-01-10 12:30:39 -0800457 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000458 },
Sunny Goyal3fd385c2025-02-19 15:45:59 -0800459 kotlincflags: [
460 "-Xjvm-default=all",
461 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800462}
463
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800464// Library with all the dependencies for building quickstep
465android_library {
466 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800467 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800468 resource_dirs: [
469 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800470 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700471 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000472 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700473 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800474 static_libs: [
475 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800476 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800477 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000478 "SettingsLibSettingsTheme",
Anushree Ganjambd863312024-08-23 17:15:30 -0700479 "dagger2",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400480 "protolog-group",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800481 ],
482 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700483 min_sdk_version: "current",
Sam Cackett65936222024-12-10 16:39:36 +0000484 lint: {
485 disabled_checks: ["MissingClass"],
486 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800487}
488
Sunny Goyal77954ba2024-03-25 11:53:17 -0700489// Library with all the source code and dependencies for building Launcher Go
Jon Spivacka65d68b2021-04-07 10:22:25 -0700490android_library {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700491 name: "Launcher3GoLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100492 defaults: [
493 "launcher_compose_defaults",
494 "quickstep_compose_defaults",
495 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700496 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000497 ":launcher-src",
498 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700499 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700500 "go/quickstep/src/**/*.java",
501 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700502 ],
503 resource_dirs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700504 "go/quickstep/res",
505 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000506 // Note the ordering here is important when it comes to resource
507 // overriding. We want the most specific resource overrides defined
508 // in QuickstepResLib to take precendece, so it should be the final
509 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700510 static_libs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700511 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700512 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700513 ],
Anushree Ganjambd863312024-08-23 17:15:30 -0700514 plugins: [
515 "androidx.room_room-compiler-plugin",
516 "dagger2-compiler",
517 ],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530518 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700519 additional_manifests: [
520 "go/AndroidManifest.xml",
521 "AndroidManifest-common.xml",
522 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700523 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800524 // TODO(b/319712088): re-enable use_resource_processor
525 use_resource_processor: false,
Sunny Goyal3fd385c2025-02-19 15:45:59 -0800526 kotlincflags: [
527 "-Xjvm-default=all",
528 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700529}
530
Sunny Goyal77954ba2024-03-25 11:53:17 -0700531// Library with all the source code and dependencies for building Quickstep
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700532android_library {
533 name: "Launcher3QuickStepLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100534 defaults: [
535 "launcher_compose_defaults",
Anushree Ganjambd863312024-08-23 17:15:30 -0700536 "quickstep_compose_defaults",
Jordan Silva4afa1952024-08-06 16:54:59 +0100537 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700538 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000539 ":launcher-src",
540 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700541 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700542 ":launcher-build-config",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700543 ],
Thales Limac335ad22021-11-08 15:31:49 +0000544 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700545 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000546 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700547 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000548 // Note the ordering here is important when it comes to resource
549 // overriding. We want the most specific resource overrides defined
550 // in QuickstepResLib to take precendece, so it should be the final
551 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700552 static_libs: [
553 "SystemUI-statsd",
Ben Murdochfabc8732021-12-02 18:22:17 +0000554 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700555 ],
556 manifest: "quickstep/AndroidManifest.xml",
557 platform_apis: true,
Anushree Ganjambd863312024-08-23 17:15:30 -0700558 plugins: ["dagger2-compiler"],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700559 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800560 // TODO(b/319712088): re-enable use_resource_processor
561 use_resource_processor: false,
Sunny Goyal3fd385c2025-02-19 15:45:59 -0800562 kotlincflags: [
563 "-Xjvm-default=all",
564 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700565}
Thales Lima813834a2022-05-18 15:29:59 +0000566
Thales Lima813834a2022-05-18 15:29:59 +0000567// Build rule for Quickstep app.
568android_app {
569 name: "Launcher3QuickStep",
Thales Lima813834a2022-05-18 15:29:59 +0000570 static_libs: ["Launcher3QuickStepLib"],
571 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000572 proguard_flags_files: [":launcher-proguard-rules"],
573 enabled: true,
574 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000575 },
576
577 platform_apis: true,
578 min_sdk_version: "current",
579 target_sdk_version: "current",
580
581 privileged: true,
582 system_ext_specific: true,
583 overrides: [
584 "Home",
585 "Launcher2",
586 "Launcher3",
587 ],
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400588 required: [
589 "privapp_whitelist_com.android.launcher3",
590 "launcher.quickstep.protolog.pb",
591 ],
Thales Lima813834a2022-05-18 15:29:59 +0000592
593 resource_dirs: ["quickstep/res"],
594
595 additional_manifests: [
596 "quickstep/AndroidManifest-launcher.xml",
597 "AndroidManifest-common.xml",
598 ],
599
600 manifest: "quickstep/AndroidManifest.xml",
601 jacoco: {
602 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800603 },
Thales Lima813834a2022-05-18 15:29:59 +0000604
605}
606
Sunny Goyal77954ba2024-03-25 11:53:17 -0700607// Build rule for Launcher3 Go app with quickstep for Android Go devices.
608// Note that the following two rules are exactly same, and should
609// eventually be merged into a single target
610android_app {
611 name: "Launcher3Go",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700612 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000613 resource_dirs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000614
615 platform_apis: true,
616 min_sdk_version: "current",
617 target_sdk_version: "current",
618
Thales Lima813834a2022-05-18 15:29:59 +0000619 optimize: {
620 proguard_flags_files: ["proguard.flags"],
621 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000622 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000623 },
624
625 privileged: true,
626 system_ext_specific: true,
627 overrides: [
628 "Home",
629 "Launcher2",
630 "Launcher3",
631 "Launcher3QuickStep",
632 ],
633 required: ["privapp_whitelist_com.android.launcher3"],
634
635 additional_manifests: [
636 "go/AndroidManifest.xml",
637 "go/AndroidManifest-launcher.xml",
638 "AndroidManifest-common.xml",
639 ],
640
641 manifest: "quickstep/AndroidManifest.xml",
642 jacoco: {
643 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800644 },
Sunny Goyal77954ba2024-03-25 11:53:17 -0700645}
Anushree Ganjambd863312024-08-23 17:15:30 -0700646
Sunny Goyal77954ba2024-03-25 11:53:17 -0700647android_app {
648 name: "Launcher3QuickStepGo",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700649 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000650 resource_dirs: [],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700651
652 platform_apis: true,
653 min_sdk_version: "current",
654 target_sdk_version: "current",
655
656 optimize: {
657 proguard_flags_files: ["proguard.flags"],
658 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000659 shrink_resources: true,
Sunny Goyal77954ba2024-03-25 11:53:17 -0700660 },
661
662 privileged: true,
663 system_ext_specific: true,
664 overrides: [
665 "Home",
666 "Launcher2",
667 "Launcher3",
668 "Launcher3QuickStep",
669 ],
670 required: ["privapp_whitelist_com.android.launcher3"],
671
672 additional_manifests: [
673 "go/AndroidManifest.xml",
674 "go/AndroidManifest-launcher.xml",
675 "AndroidManifest-common.xml",
676 ],
677
678 manifest: "quickstep/AndroidManifest.xml",
679 jacoco: {
680 include_filter: ["com.android.launcher3.*"],
681 },
Thales Lima813834a2022-05-18 15:29:59 +0000682}