blob: 9d7aa73a8fb8525588ac7795b3d2edb922f163d2 [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",
69 ":launcher-quickstep-processed-protolog-src",
Cole Faustbad33e62023-12-20 11:57:04 -080070 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000071}
72
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040073// Launcher ProtoLog support
74filegroup {
75 name: "launcher-quickstep-unprocessed-protolog-src",
76 srcs: [
77 "quickstep/src_protolog/**/*.java",
78 ],
79}
80
81java_library {
82 name: "launcher-quickstep_protolog-groups",
83 srcs: [
84 "quickstep/src_protolog/**/*.java",
85 ],
86 static_libs: [
87 "protolog-group",
88 "androidx.annotation_annotation",
89 "com_android_launcher3_flags_lib",
90 ],
91}
92
93genrule {
94 name: "launcher-quickstep-processed-protolog-src",
95 srcs: [
96 ":protolog-impl",
97 ":launcher-quickstep-unprocessed-protolog-src",
98 ":launcher-quickstep_protolog-groups",
99 ],
100 tools: ["protologtool"],
101 cmd: "$(location protologtool) transform-protolog-calls " +
102 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
103 "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
104 "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
105 "--viewer-config-file-path /system_ext/etc/launcher.quickstep.protolog.pb " +
106 "--output-srcjar $(out) " +
107 "$(locations :launcher-quickstep-unprocessed-protolog-src)",
108 out: ["launcher.quickstep.protolog.srcjar"],
109}
110
111genrule {
112 name: "gen-launcher.quickstep.protolog.pb",
113 srcs: [
114 ":launcher-quickstep-unprocessed-protolog-src",
115 ":launcher-quickstep_protolog-groups",
116 ],
117 tools: ["protologtool"],
118 cmd: "$(location protologtool) generate-viewer-config " +
119 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
120 "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
121 "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
122 "--viewer-config-type proto " +
123 "--viewer-config $(out) " +
124 "$(locations :launcher-quickstep-unprocessed-protolog-src)",
125 out: ["launcher.quickstep.protolog.pb"],
126}
127
128prebuilt_etc {
129 name: "launcher.quickstep.protolog.pb",
130 system_ext_specific: true,
131 src: ":gen-launcher.quickstep.protolog.pb",
132 filename_from_src: true,
133}
134
Anushree Ganjam14721d12024-08-29 10:05:12 -0700135// Source code for quickstep dagger
136filegroup {
137 name: "launcher-quickstep-dagger",
138 srcs: [
139 "quickstep/dagger/**/*.java",
140 "quickstep/dagger/**/*.kt",
141 ],
142}
143
Jordan Silva4afa1952024-08-06 16:54:59 +0100144// Source code for quickstep build with compose enabled, on top of launcher-src
145filegroup {
146 name: "launcher-quickstep-compose-enabled-src",
147 srcs: [
148 "quickstep/compose/facade/core/*.kt",
149 "quickstep/compose/facade/enabled/*.kt",
150 "quickstep/compose/features/**/*.kt",
151 ],
152}
153
154filegroup {
155 name: "launcher-quickstep-compose-disabled-src",
156 srcs: [
157 "quickstep/compose/facade/core/*.kt",
158 "quickstep/compose/facade/disabled/*.kt",
159 ],
160}
161
Sunny Goyal77954ba2024-03-25 11:53:17 -0700162// Alternate source when quickstep is not included
Thales Lima2c54bbf2022-07-12 15:45:10 +0000163filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700164 name: "launcher-src_no_quickstep",
Cole Faustbad33e62023-12-20 11:57:04 -0800165 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700166 "src_no_quickstep/**/*.java",
167 "src_no_quickstep/**/*.kt",
Cole Faustbad33e62023-12-20 11:57:04 -0800168 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +0000169}
170
Sunny Goyal77954ba2024-03-25 11:53:17 -0700171// Default build config for Launcher3
Thales Lima2c54bbf2022-07-12 15:45:10 +0000172filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700173 name: "launcher-build-config",
Cole Faustbad33e62023-12-20 11:57:04 -0800174 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700175 "src_build_config/**/*.java",
Cole Faustbad33e62023-12-20 11:57:04 -0800176 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +0000177}
178
Thales Lima2c54bbf2022-07-12 15:45:10 +0000179// Proguard files for Launcher3
180filegroup {
181 name: "launcher-proguard-rules",
182 srcs: ["proguard.flags"],
183}
184
Jordan Silva4afa1952024-08-06 16:54:59 +0100185// Opt-in configuration for Launcher3 code depending on Jetpack Compose.
186soong_config_module_type {
187 name: "launcher_compose_java_defaults",
188 module_type: "java_defaults",
189 config_namespace: "ANDROID",
190 bool_variables: ["release_enable_compose_in_launcher"],
191 properties: [
192 "srcs",
193 "static_libs",
194 ],
195}
196
197// Opt-in configuration for Launcher Quickstep code depending on Jetpack Compose.
198soong_config_bool_variable {
199 name: "release_enable_compose_in_launcher",
200}
201
202soong_config_module_type {
203 name: "quickstep_compose_java_defaults",
204 module_type: "java_defaults",
205 config_namespace: "ANDROID",
206 bool_variables: ["release_enable_compose_in_launcher"],
207 properties: [
208 "srcs",
209 "static_libs",
210 ],
211}
212
213soong_config_module_type {
214 name: "launcher_compose_tests_java_defaults",
215 module_type: "java_defaults",
216 config_namespace: "ANDROID",
217 bool_variables: ["release_enable_compose_in_launcher"],
218 properties: [
219 "static_libs",
220 ],
221}
222
223launcher_compose_java_defaults {
224 name: "launcher_compose_defaults",
225 soong_config_variables: {
226 release_enable_compose_in_launcher: {
227 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700228 ":launcher-compose-enabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100229 ],
230
231 // Compose dependencies
232 static_libs: [
233 "androidx.compose.runtime_runtime",
234 "androidx.compose.material3_material3",
235 ],
236
237 // By default, Compose is disabled and we compile the ComposeFacade
238 // in compose/launcher3/facade/disabled/.
239 conditions_default: {
240 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700241 ":launcher-compose-disabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100242 ],
243 static_libs: [],
244 },
245 },
246 },
247}
248
249quickstep_compose_java_defaults {
250 name: "quickstep_compose_defaults",
251 soong_config_variables: {
252 release_enable_compose_in_launcher: {
253 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700254 ":launcher-quickstep-compose-enabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100255 ],
256
257 // Compose dependencies
258 static_libs: [
259 "androidx.compose.runtime_runtime",
260 "androidx.compose.material3_material3",
261 ],
262
263 // By default, Compose is disabled and we compile the ComposeFacade
264 // in compose/quickstep/facade/disabled/.
265 conditions_default: {
266 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700267 ":launcher-quickstep-compose-disabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100268 ],
269 static_libs: [],
270 },
271 },
272 },
273}
274
275launcher_compose_tests_java_defaults {
276 name: "launcher_compose_tests_defaults",
277 soong_config_variables: {
278 release_enable_compose_in_launcher: {
279 // Compose dependencies
280 static_libs: [
281 "androidx.compose.runtime_runtime",
282 "androidx.compose.ui_ui-test-junit4",
283 "androidx.compose.ui_ui-test-manifest",
284 ],
285
286 conditions_default: {
287 static_libs: [],
288 },
289 },
290 },
291}
292
vadimt09df0832019-03-07 14:59:30 -0800293android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700294 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700295 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000296 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700297 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700298 static_libs: [
299 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -0700300 "androidx.test.runner",
301 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700302 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -0700303 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700304 "SystemUISharedLib",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -0700305 "//frameworks/libs/systemui:animationlib",
helencheuk39a60932024-08-05 16:11:07 +0100306 "//frameworks/libs/systemui:contextualeducationlib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000307 "launcher-testing-shared",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700308 ],
309 srcs: [
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +0000310 "tests/tapl/**/*.java",
311 "tests/tapl/**/*.kt",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700312 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800313 resource_dirs: [],
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +0000314 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700315 platform_apis: true,
316}
thiruram5e1ecf62019-11-13 17:49:35 -0800317
318java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -0800319 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -0800320 srcs: [
321 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -0800322 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -0800323 ],
324 sdk_version: "current",
325 proto: {
326 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800327 local_include_dirs: [
thiruram5e1ecf62019-11-13 17:49:35 -0800328 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800329 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800330 ],
331 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800332 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800333}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800334
thiruramcbeb13d2021-01-27 14:45:58 -0800335java_library_static {
336 name: "launcher_quickstep_log_protos_lite",
337 srcs: [
338 "quickstep/protos_overrides/*.proto",
339 ],
340 sdk_version: "current",
341 proto: {
342 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800343 local_include_dirs: [
thiruramcbeb13d2021-01-27 14:45:58 -0800344 "quickstep/protos_overrides",
345 ],
346 },
347 static_libs: [
Cole Faustbad33e62023-12-20 11:57:04 -0800348 "libprotobuf-java-lite",
349 "launcher_log_protos_lite",
350 ],
thiruramcbeb13d2021-01-27 14:45:58 -0800351}
352
Hyunyoung Song8605be32020-02-21 14:52:25 -0800353java_library {
354 name: "LauncherPluginLib",
355
356 static_libs: ["PluginCoreLib"],
357
358 srcs: ["src_plugins/**/*.java"],
359
360 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700361 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800362}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800363
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800364// Library with all the dependencies for building Launcher3
365android_library {
366 name: "Launcher3ResLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100367 defaults: [
368 "launcher_compose_defaults",
369 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800370 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800371 resource_dirs: ["res"],
372 static_libs: [
373 "LauncherPluginLib",
374 "launcher_quickstep_log_protos_lite",
375 "androidx-constraintlayout_constraintlayout",
376 "androidx.recyclerview_recyclerview",
377 "androidx.dynamicanimation_dynamicanimation",
378 "androidx.fragment_fragment",
379 "androidx.preference_preference",
380 "androidx.slice_slice-view",
381 "androidx.cardview_cardview",
Sebastian Franco9ae40322023-10-10 10:50:28 -0700382 "androidx.window_window",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400383 "com.google.android.material_material",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -0700384 "//frameworks/libs/systemui:iconloader_base",
385 "//frameworks/libs/systemui:view_capture",
386 "//frameworks/libs/systemui:animationlib",
helencheuk39a60932024-08-05 16:11:07 +0100387 "//frameworks/libs/systemui:contextualeducationlib",
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000388 "SystemUI-statsd",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000389 "launcher-testing-shared",
Uwais Ashraf6e9927e2024-03-25 10:53:06 +0000390 "androidx.lifecycle_lifecycle-common-java8",
391 "androidx.lifecycle_lifecycle-extensions",
392 "androidx.lifecycle_lifecycle-runtime-ktx",
393 "kotlinx_coroutines_android",
394 "kotlinx_coroutines",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700395 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700396 "com_android_wm_shell_flags_lib",
Anushree Ganjambd863312024-08-23 17:15:30 -0700397 "dagger2",
398 "jsr330",
George Linde4d7452024-08-27 16:57:32 +0000399 "com_android_systemui_shared_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000400 ],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700401 manifest: "AndroidManifest-common.xml",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800402 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700403 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000404 lint: {
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700405 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000406 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800407}
408
409//
410// Build rule for Launcher3 app.
411//
412android_app {
413 name: "Launcher3",
Jared Duke1222dd72024-07-12 00:01:11 +0000414 defaults: ["launcher-non-platform-apis-defaults"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800415
416 static_libs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700417 "Launcher3ResLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800418 ],
419 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000420 ":launcher-src",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700421 ":launcher-src_no_quickstep",
422 ":launcher-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800423 ],
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700424
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800425 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000426 proguard_flags_files: [":launcher-proguard-rules"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800427 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
428 enabled: false,
429 },
430
431 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700432 min_sdk_version: min_launcher3_sdk_version,
433 target_sdk_version: "current",
Anushree Ganjambd863312024-08-23 17:15:30 -0700434 plugins: ["dagger2-compiler"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800435 privileged: true,
436 system_ext_specific: true,
437
438 overrides: [
439 "Home",
440 "Launcher2",
441 ],
442 required: ["privapp_whitelist_com.android.launcher3"],
443
444 jacoco: {
445 include_filter: ["com.android.launcher3.**"],
446 },
447 additional_manifests: [
448 "AndroidManifest-common.xml",
449 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000450 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800451 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000452 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800453}
454
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800455// Library with all the dependencies for building quickstep
456android_library {
457 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800458 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800459 resource_dirs: [
460 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800461 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700462 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000463 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700464 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800465 static_libs: [
466 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800467 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800468 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000469 "SettingsLibSettingsTheme",
Anushree Ganjambd863312024-08-23 17:15:30 -0700470 "dagger2",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400471 "protolog-group",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800472 ],
473 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700474 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800475}
476
Sunny Goyal77954ba2024-03-25 11:53:17 -0700477// Library with all the source code and dependencies for building Launcher Go
Jon Spivacka65d68b2021-04-07 10:22:25 -0700478android_library {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700479 name: "Launcher3GoLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100480 defaults: [
481 "launcher_compose_defaults",
482 "quickstep_compose_defaults",
483 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700484 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000485 ":launcher-src",
486 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700487 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700488 "go/quickstep/src/**/*.java",
489 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700490 ],
491 resource_dirs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700492 "go/quickstep/res",
493 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000494 // Note the ordering here is important when it comes to resource
495 // overriding. We want the most specific resource overrides defined
496 // in QuickstepResLib to take precendece, so it should be the final
497 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700498 static_libs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700499 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700500 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700501 ],
Anushree Ganjambd863312024-08-23 17:15:30 -0700502 plugins: [
503 "androidx.room_room-compiler-plugin",
504 "dagger2-compiler",
505 ],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530506 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700507 additional_manifests: [
508 "go/AndroidManifest.xml",
509 "AndroidManifest-common.xml",
510 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700511 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800512 // TODO(b/319712088): re-enable use_resource_processor
513 use_resource_processor: false,
Jon Spivacka65d68b2021-04-07 10:22:25 -0700514}
515
Sunny Goyal77954ba2024-03-25 11:53:17 -0700516// Library with all the source code and dependencies for building Quickstep
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700517android_library {
518 name: "Launcher3QuickStepLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100519 defaults: [
520 "launcher_compose_defaults",
Anushree Ganjambd863312024-08-23 17:15:30 -0700521 "quickstep_compose_defaults",
Jordan Silva4afa1952024-08-06 16:54:59 +0100522 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700523 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000524 ":launcher-src",
525 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700526 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700527 ":launcher-build-config",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700528 ],
Thales Limac335ad22021-11-08 15:31:49 +0000529 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700530 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000531 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700532 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000533 // Note the ordering here is important when it comes to resource
534 // overriding. We want the most specific resource overrides defined
535 // in QuickstepResLib to take precendece, so it should be the final
536 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700537 static_libs: [
538 "SystemUI-statsd",
Ben Murdochfabc8732021-12-02 18:22:17 +0000539 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700540 ],
541 manifest: "quickstep/AndroidManifest.xml",
542 platform_apis: true,
Anushree Ganjambd863312024-08-23 17:15:30 -0700543 plugins: ["dagger2-compiler"],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700544 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800545 // TODO(b/319712088): re-enable use_resource_processor
546 use_resource_processor: false,
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700547}
Thales Lima813834a2022-05-18 15:29:59 +0000548
Thales Lima813834a2022-05-18 15:29:59 +0000549// Build rule for Quickstep app.
550android_app {
551 name: "Launcher3QuickStep",
Thales Lima813834a2022-05-18 15:29:59 +0000552 static_libs: ["Launcher3QuickStepLib"],
553 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000554 proguard_flags_files: [":launcher-proguard-rules"],
555 enabled: true,
556 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000557 },
558
559 platform_apis: true,
560 min_sdk_version: "current",
561 target_sdk_version: "current",
562
563 privileged: true,
564 system_ext_specific: true,
565 overrides: [
566 "Home",
567 "Launcher2",
568 "Launcher3",
569 ],
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400570 required: [
571 "privapp_whitelist_com.android.launcher3",
572 "launcher.quickstep.protolog.pb",
573 ],
Thales Lima813834a2022-05-18 15:29:59 +0000574
575 resource_dirs: ["quickstep/res"],
576
577 additional_manifests: [
578 "quickstep/AndroidManifest-launcher.xml",
579 "AndroidManifest-common.xml",
580 ],
581
582 manifest: "quickstep/AndroidManifest.xml",
583 jacoco: {
584 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800585 },
Thales Lima813834a2022-05-18 15:29:59 +0000586
587}
588
Sunny Goyal77954ba2024-03-25 11:53:17 -0700589// Build rule for Launcher3 Go app with quickstep for Android Go devices.
590// Note that the following two rules are exactly same, and should
591// eventually be merged into a single target
592android_app {
593 name: "Launcher3Go",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700594 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000595 resource_dirs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000596
597 platform_apis: true,
598 min_sdk_version: "current",
599 target_sdk_version: "current",
600
Thales Lima813834a2022-05-18 15:29:59 +0000601 optimize: {
602 proguard_flags_files: ["proguard.flags"],
603 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000604 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000605 },
606
607 privileged: true,
608 system_ext_specific: true,
609 overrides: [
610 "Home",
611 "Launcher2",
612 "Launcher3",
613 "Launcher3QuickStep",
614 ],
615 required: ["privapp_whitelist_com.android.launcher3"],
616
617 additional_manifests: [
618 "go/AndroidManifest.xml",
619 "go/AndroidManifest-launcher.xml",
620 "AndroidManifest-common.xml",
621 ],
622
623 manifest: "quickstep/AndroidManifest.xml",
624 jacoco: {
625 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800626 },
Sunny Goyal77954ba2024-03-25 11:53:17 -0700627}
Anushree Ganjambd863312024-08-23 17:15:30 -0700628
Sunny Goyal77954ba2024-03-25 11:53:17 -0700629android_app {
630 name: "Launcher3QuickStepGo",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700631 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000632 resource_dirs: [],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700633
634 platform_apis: true,
635 min_sdk_version: "current",
636 target_sdk_version: "current",
637
638 optimize: {
639 proguard_flags_files: ["proguard.flags"],
640 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000641 shrink_resources: true,
Sunny Goyal77954ba2024-03-25 11:53:17 -0700642 },
643
644 privileged: true,
645 system_ext_specific: true,
646 overrides: [
647 "Home",
648 "Launcher2",
649 "Launcher3",
650 "Launcher3QuickStep",
651 ],
652 required: ["privapp_whitelist_com.android.launcher3"],
653
654 additional_manifests: [
655 "go/AndroidManifest.xml",
656 "go/AndroidManifest-launcher.xml",
657 "AndroidManifest-common.xml",
658 ],
659
660 manifest: "quickstep/AndroidManifest.xml",
661 jacoco: {
662 include_filter: ["com.android.launcher3.*"],
663 },
Thales Lima813834a2022-05-18 15:29:59 +0000664}