blob: 223e2c2987429ea2f0dcb8a92cfc072f7d74dfe6 [file] [log] [blame]
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -07001// Copyright (C) 2018 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Bob Badour4bdf3802021-02-12 17:08:17 -080015package {
Bob Badoura7548b52022-01-27 22:04:48 -080016 // See: http://go/android-license-faq
17 default_applicable_licenses: ["Android-Apache-2.0"],
Bob Badour4bdf3802021-02-12 17:08:17 -080018}
19
Sunny Goyal621918f2024-09-18 11:31:58 -070020min_launcher3_sdk_version = "31"
Sunny Goyal1fb271f2021-05-20 10:43:23 -070021
Jared Duke1222dd72024-07-12 00:01:11 +000022// Targets that don't inherit framework aconfig libs (i.e., those that don't set
23// `platform_apis: true`) must manually link them.
24java_defaults {
25 name: "launcher-non-platform-apis-defaults",
26 static_libs: [
27 "android.os.flags-aconfig-java",
28 "android.appwidget.flags-aconfig-java",
29 "com.android.window.flags.window-aconfig-java",
Anushree Ganjambd863312024-08-23 17:15:30 -070030 ],
Jared Duke1222dd72024-07-12 00:01:11 +000031}
32
Thales Lima2c54bbf2022-07-12 15:45:10 +000033// Common source files used to build launcher (java and kotlin)
34// All sources are split so they can be reused in many other libraries/apps in other folders
Sunny Goyal77954ba2024-03-25 11:53:17 -070035
36// Main Launcher source, excluding the build config
Thales Lima2c54bbf2022-07-12 15:45:10 +000037filegroup {
38 name: "launcher-src",
Cole Faustbad33e62023-12-20 11:57:04 -080039 srcs: [
40 "src/**/*.java",
41 "src/**/*.kt",
42 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000043}
44
Jordan Silva4afa1952024-08-06 16:54:59 +010045// Main Launcher source for compose, excluding the build config
46filegroup {
47 name: "launcher-compose-enabled-src",
48 srcs: [
49 "compose/facade/enabled/*.kt",
50 "compose/facade/core/*.kt",
51 "compose/features/**/*.kt",
52 ],
53}
54
55filegroup {
56 name: "launcher-compose-disabled-src",
57 srcs: [
58 "compose/facade/core/*.kt",
59 "compose/facade/disabled/*.kt",
60 ],
61}
62
Sunny Goyal77954ba2024-03-25 11:53:17 -070063// Source code for quickstep build, on top of launcher-src
Thales Lima2c54bbf2022-07-12 15:45:10 +000064filegroup {
65 name: "launcher-quickstep-src",
Cole Faustbad33e62023-12-20 11:57:04 -080066 srcs: [
Cole Faustbad33e62023-12-20 11:57:04 -080067 "quickstep/src/**/*.kt",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040068 "quickstep/src/**/*.java",
Cole Faustcfa4fe72024-10-28 12:20:53 -070069 ],
70 device_common_srcs: [
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040071 ":launcher-quickstep-processed-protolog-src",
Cole Faustbad33e62023-12-20 11:57:04 -080072 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000073}
74
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040075// Launcher ProtoLog support
76filegroup {
77 name: "launcher-quickstep-unprocessed-protolog-src",
78 srcs: [
79 "quickstep/src_protolog/**/*.java",
80 ],
81}
82
83java_library {
84 name: "launcher-quickstep_protolog-groups",
85 srcs: [
86 "quickstep/src_protolog/**/*.java",
87 ],
88 static_libs: [
89 "protolog-group",
90 "androidx.annotation_annotation",
91 "com_android_launcher3_flags_lib",
92 ],
93}
94
Cole Faustcfa4fe72024-10-28 12:20:53 -070095java_genrule {
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -040096 name: "launcher-quickstep-processed-protolog-src",
97 srcs: [
98 ":protolog-impl",
99 ":launcher-quickstep-unprocessed-protolog-src",
100 ":launcher-quickstep_protolog-groups",
101 ],
102 tools: ["protologtool"],
103 cmd: "$(location protologtool) transform-protolog-calls " +
104 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
105 "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
106 "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
107 "--viewer-config-file-path /system_ext/etc/launcher.quickstep.protolog.pb " +
108 "--output-srcjar $(out) " +
109 "$(locations :launcher-quickstep-unprocessed-protolog-src)",
110 out: ["launcher.quickstep.protolog.srcjar"],
111}
112
Cole Faustcfa4fe72024-10-28 12:20:53 -0700113java_genrule {
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400114 name: "gen-launcher.quickstep.protolog.pb",
115 srcs: [
116 ":launcher-quickstep-unprocessed-protolog-src",
117 ":launcher-quickstep_protolog-groups",
118 ],
119 tools: ["protologtool"],
120 cmd: "$(location protologtool) generate-viewer-config " +
121 "--protolog-class com.android.internal.protolog.common.ProtoLog " +
122 "--loggroups-class com.android.quickstep.util.QuickstepProtoLogGroup " +
123 "--loggroups-jar $(location :launcher-quickstep_protolog-groups) " +
124 "--viewer-config-type proto " +
125 "--viewer-config $(out) " +
126 "$(locations :launcher-quickstep-unprocessed-protolog-src)",
127 out: ["launcher.quickstep.protolog.pb"],
128}
129
130prebuilt_etc {
131 name: "launcher.quickstep.protolog.pb",
132 system_ext_specific: true,
133 src: ":gen-launcher.quickstep.protolog.pb",
134 filename_from_src: true,
135}
136
Anushree Ganjam14721d12024-08-29 10:05:12 -0700137// Source code for quickstep dagger
138filegroup {
139 name: "launcher-quickstep-dagger",
140 srcs: [
141 "quickstep/dagger/**/*.java",
142 "quickstep/dagger/**/*.kt",
143 ],
144}
145
Jordan Silva4afa1952024-08-06 16:54:59 +0100146// Source code for quickstep build with compose enabled, on top of launcher-src
147filegroup {
148 name: "launcher-quickstep-compose-enabled-src",
149 srcs: [
150 "quickstep/compose/facade/core/*.kt",
151 "quickstep/compose/facade/enabled/*.kt",
152 "quickstep/compose/features/**/*.kt",
153 ],
154}
155
156filegroup {
157 name: "launcher-quickstep-compose-disabled-src",
158 srcs: [
159 "quickstep/compose/facade/core/*.kt",
160 "quickstep/compose/facade/disabled/*.kt",
161 ],
162}
163
Sunny Goyal77954ba2024-03-25 11:53:17 -0700164// Alternate source when quickstep is not included
Thales Lima2c54bbf2022-07-12 15:45:10 +0000165filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700166 name: "launcher-src_no_quickstep",
Cole Faustbad33e62023-12-20 11:57:04 -0800167 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700168 "src_no_quickstep/**/*.java",
169 "src_no_quickstep/**/*.kt",
Cole Faustbad33e62023-12-20 11:57:04 -0800170 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +0000171}
172
Sunny Goyal77954ba2024-03-25 11:53:17 -0700173// Default build config for Launcher3
Thales Lima2c54bbf2022-07-12 15:45:10 +0000174filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700175 name: "launcher-build-config",
Cole Faustbad33e62023-12-20 11:57:04 -0800176 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700177 "src_build_config/**/*.java",
Cole Faustbad33e62023-12-20 11:57:04 -0800178 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +0000179}
180
Thales Lima2c54bbf2022-07-12 15:45:10 +0000181// Proguard files for Launcher3
182filegroup {
183 name: "launcher-proguard-rules",
184 srcs: ["proguard.flags"],
185}
186
Jordan Silva4afa1952024-08-06 16:54:59 +0100187// Opt-in configuration for Launcher3 code depending on Jetpack Compose.
188soong_config_module_type {
189 name: "launcher_compose_java_defaults",
190 module_type: "java_defaults",
191 config_namespace: "ANDROID",
192 bool_variables: ["release_enable_compose_in_launcher"],
193 properties: [
194 "srcs",
195 "static_libs",
196 ],
197}
198
199// Opt-in configuration for Launcher Quickstep code depending on Jetpack Compose.
200soong_config_bool_variable {
201 name: "release_enable_compose_in_launcher",
202}
203
204soong_config_module_type {
205 name: "quickstep_compose_java_defaults",
206 module_type: "java_defaults",
207 config_namespace: "ANDROID",
208 bool_variables: ["release_enable_compose_in_launcher"],
209 properties: [
210 "srcs",
211 "static_libs",
212 ],
213}
214
215soong_config_module_type {
216 name: "launcher_compose_tests_java_defaults",
217 module_type: "java_defaults",
218 config_namespace: "ANDROID",
219 bool_variables: ["release_enable_compose_in_launcher"],
220 properties: [
221 "static_libs",
222 ],
223}
224
225launcher_compose_java_defaults {
226 name: "launcher_compose_defaults",
227 soong_config_variables: {
228 release_enable_compose_in_launcher: {
229 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700230 ":launcher-compose-enabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100231 ],
232
233 // Compose dependencies
234 static_libs: [
235 "androidx.compose.runtime_runtime",
236 "androidx.compose.material3_material3",
237 ],
238
239 // By default, Compose is disabled and we compile the ComposeFacade
240 // in compose/launcher3/facade/disabled/.
241 conditions_default: {
242 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700243 ":launcher-compose-disabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100244 ],
245 static_libs: [],
246 },
247 },
248 },
249}
250
251quickstep_compose_java_defaults {
252 name: "quickstep_compose_defaults",
253 soong_config_variables: {
254 release_enable_compose_in_launcher: {
255 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700256 ":launcher-quickstep-compose-enabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100257 ],
258
259 // Compose dependencies
260 static_libs: [
261 "androidx.compose.runtime_runtime",
262 "androidx.compose.material3_material3",
263 ],
264
265 // By default, Compose is disabled and we compile the ComposeFacade
266 // in compose/quickstep/facade/disabled/.
267 conditions_default: {
268 srcs: [
Anushree Ganjambd863312024-08-23 17:15:30 -0700269 ":launcher-quickstep-compose-disabled-src",
Jordan Silva4afa1952024-08-06 16:54:59 +0100270 ],
271 static_libs: [],
272 },
273 },
274 },
275}
276
277launcher_compose_tests_java_defaults {
278 name: "launcher_compose_tests_defaults",
279 soong_config_variables: {
280 release_enable_compose_in_launcher: {
281 // Compose dependencies
282 static_libs: [
283 "androidx.compose.runtime_runtime",
284 "androidx.compose.ui_ui-test-junit4",
285 "androidx.compose.ui_ui-test-manifest",
286 ],
287
288 conditions_default: {
289 static_libs: [],
290 },
291 },
292 },
293}
294
vadimt09df0832019-03-07 14:59:30 -0800295android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700296 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700297 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000298 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700299 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700300 static_libs: [
301 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -0700302 "androidx.test.runner",
303 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700304 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -0700305 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700306 "SystemUISharedLib",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -0700307 "//frameworks/libs/systemui:animationlib",
helencheuk39a60932024-08-05 16:11:07 +0100308 "//frameworks/libs/systemui:contextualeducationlib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000309 "launcher-testing-shared",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700310 ],
311 srcs: [
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +0000312 "tests/tapl/**/*.java",
313 "tests/tapl/**/*.kt",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700314 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800315 resource_dirs: [],
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +0000316 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -0700317 platform_apis: true,
318}
thiruram5e1ecf62019-11-13 17:49:35 -0800319
320java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -0800321 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -0800322 srcs: [
323 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -0800324 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -0800325 ],
326 sdk_version: "current",
327 proto: {
328 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800329 local_include_dirs: [
thiruram5e1ecf62019-11-13 17:49:35 -0800330 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800331 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800332 ],
333 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800334 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800335}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800336
thiruramcbeb13d2021-01-27 14:45:58 -0800337java_library_static {
338 name: "launcher_quickstep_log_protos_lite",
339 srcs: [
340 "quickstep/protos_overrides/*.proto",
341 ],
342 sdk_version: "current",
343 proto: {
344 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800345 local_include_dirs: [
thiruramcbeb13d2021-01-27 14:45:58 -0800346 "quickstep/protos_overrides",
347 ],
348 },
349 static_libs: [
Cole Faustbad33e62023-12-20 11:57:04 -0800350 "libprotobuf-java-lite",
351 "launcher_log_protos_lite",
352 ],
thiruramcbeb13d2021-01-27 14:45:58 -0800353}
354
Hyunyoung Song8605be32020-02-21 14:52:25 -0800355java_library {
356 name: "LauncherPluginLib",
357
358 static_libs: ["PluginCoreLib"],
359
360 srcs: ["src_plugins/**/*.java"],
361
362 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700363 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800364}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800365
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800366// Library with all the dependencies for building Launcher3
367android_library {
368 name: "Launcher3ResLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100369 defaults: [
370 "launcher_compose_defaults",
371 ],
Cole Faustbad33e62023-12-20 11:57:04 -0800372 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800373 resource_dirs: ["res"],
374 static_libs: [
375 "LauncherPluginLib",
376 "launcher_quickstep_log_protos_lite",
377 "androidx-constraintlayout_constraintlayout",
378 "androidx.recyclerview_recyclerview",
379 "androidx.dynamicanimation_dynamicanimation",
380 "androidx.fragment_fragment",
381 "androidx.preference_preference",
382 "androidx.slice_slice-view",
383 "androidx.cardview_cardview",
Sebastian Franco9ae40322023-10-10 10:50:28 -0700384 "androidx.window_window",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400385 "com.google.android.material_material",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -0700386 "//frameworks/libs/systemui:iconloader_base",
387 "//frameworks/libs/systemui:view_capture",
388 "//frameworks/libs/systemui:animationlib",
helencheuk39a60932024-08-05 16:11:07 +0100389 "//frameworks/libs/systemui:contextualeducationlib",
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000390 "SystemUI-statsd",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000391 "launcher-testing-shared",
Uwais Ashraf6e9927e2024-03-25 10:53:06 +0000392 "androidx.lifecycle_lifecycle-common-java8",
393 "androidx.lifecycle_lifecycle-extensions",
394 "androidx.lifecycle_lifecycle-runtime-ktx",
395 "kotlinx_coroutines_android",
396 "kotlinx_coroutines",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700397 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700398 "com_android_wm_shell_flags_lib",
Anushree Ganjambd863312024-08-23 17:15:30 -0700399 "dagger2",
400 "jsr330",
George Linde4d7452024-08-27 16:57:32 +0000401 "com_android_systemui_shared_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000402 ],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700403 manifest: "AndroidManifest-common.xml",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800404 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700405 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000406 lint: {
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700407 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000408 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800409}
410
411//
412// Build rule for Launcher3 app.
413//
414android_app {
415 name: "Launcher3",
Jared Duke1222dd72024-07-12 00:01:11 +0000416 defaults: ["launcher-non-platform-apis-defaults"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800417
418 static_libs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700419 "Launcher3ResLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800420 ],
421 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000422 ":launcher-src",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700423 ":launcher-src_no_quickstep",
424 ":launcher-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800425 ],
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700426
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800427 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000428 proguard_flags_files: [":launcher-proguard-rules"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800429 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
430 enabled: false,
431 },
432
433 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700434 min_sdk_version: min_launcher3_sdk_version,
435 target_sdk_version: "current",
Anushree Ganjambd863312024-08-23 17:15:30 -0700436 plugins: ["dagger2-compiler"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800437 privileged: true,
438 system_ext_specific: true,
439
440 overrides: [
441 "Home",
442 "Launcher2",
443 ],
444 required: ["privapp_whitelist_com.android.launcher3"],
445
446 jacoco: {
447 include_filter: ["com.android.launcher3.**"],
448 },
449 additional_manifests: [
450 "AndroidManifest-common.xml",
451 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000452 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800453 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000454 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800455}
456
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800457// Library with all the dependencies for building quickstep
458android_library {
459 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800460 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800461 resource_dirs: [
462 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800463 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700464 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000465 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700466 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800467 static_libs: [
468 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800469 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800470 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000471 "SettingsLibSettingsTheme",
Anushree Ganjambd863312024-08-23 17:15:30 -0700472 "dagger2",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400473 "protolog-group",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800474 ],
475 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700476 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800477}
478
Sunny Goyal77954ba2024-03-25 11:53:17 -0700479// Library with all the source code and dependencies for building Launcher Go
Jon Spivacka65d68b2021-04-07 10:22:25 -0700480android_library {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700481 name: "Launcher3GoLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100482 defaults: [
483 "launcher_compose_defaults",
484 "quickstep_compose_defaults",
485 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700486 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000487 ":launcher-src",
488 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700489 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700490 "go/quickstep/src/**/*.java",
491 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700492 ],
493 resource_dirs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700494 "go/quickstep/res",
495 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000496 // Note the ordering here is important when it comes to resource
497 // overriding. We want the most specific resource overrides defined
498 // in QuickstepResLib to take precendece, so it should be the final
499 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700500 static_libs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700501 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700502 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700503 ],
Anushree Ganjambd863312024-08-23 17:15:30 -0700504 plugins: [
505 "androidx.room_room-compiler-plugin",
506 "dagger2-compiler",
507 ],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530508 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700509 additional_manifests: [
510 "go/AndroidManifest.xml",
511 "AndroidManifest-common.xml",
512 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700513 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800514 // TODO(b/319712088): re-enable use_resource_processor
515 use_resource_processor: false,
Jon Spivacka65d68b2021-04-07 10:22:25 -0700516}
517
Sunny Goyal77954ba2024-03-25 11:53:17 -0700518// Library with all the source code and dependencies for building Quickstep
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700519android_library {
520 name: "Launcher3QuickStepLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100521 defaults: [
522 "launcher_compose_defaults",
Anushree Ganjambd863312024-08-23 17:15:30 -0700523 "quickstep_compose_defaults",
Jordan Silva4afa1952024-08-06 16:54:59 +0100524 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700525 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000526 ":launcher-src",
527 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700528 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700529 ":launcher-build-config",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700530 ],
Thales Limac335ad22021-11-08 15:31:49 +0000531 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700532 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000533 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700534 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000535 // Note the ordering here is important when it comes to resource
536 // overriding. We want the most specific resource overrides defined
537 // in QuickstepResLib to take precendece, so it should be the final
538 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700539 static_libs: [
540 "SystemUI-statsd",
Ben Murdochfabc8732021-12-02 18:22:17 +0000541 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700542 ],
543 manifest: "quickstep/AndroidManifest.xml",
544 platform_apis: true,
Anushree Ganjambd863312024-08-23 17:15:30 -0700545 plugins: ["dagger2-compiler"],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700546 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800547 // TODO(b/319712088): re-enable use_resource_processor
548 use_resource_processor: false,
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700549}
Thales Lima813834a2022-05-18 15:29:59 +0000550
Thales Lima813834a2022-05-18 15:29:59 +0000551// Build rule for Quickstep app.
552android_app {
553 name: "Launcher3QuickStep",
Thales Lima813834a2022-05-18 15:29:59 +0000554 static_libs: ["Launcher3QuickStepLib"],
555 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000556 proguard_flags_files: [":launcher-proguard-rules"],
557 enabled: true,
558 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000559 },
560
561 platform_apis: true,
562 min_sdk_version: "current",
563 target_sdk_version: "current",
564
565 privileged: true,
566 system_ext_specific: true,
567 overrides: [
568 "Home",
569 "Launcher2",
570 "Launcher3",
571 ],
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400572 required: [
573 "privapp_whitelist_com.android.launcher3",
574 "launcher.quickstep.protolog.pb",
575 ],
Thales Lima813834a2022-05-18 15:29:59 +0000576
577 resource_dirs: ["quickstep/res"],
578
579 additional_manifests: [
580 "quickstep/AndroidManifest-launcher.xml",
581 "AndroidManifest-common.xml",
582 ],
583
584 manifest: "quickstep/AndroidManifest.xml",
585 jacoco: {
586 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800587 },
Thales Lima813834a2022-05-18 15:29:59 +0000588
589}
590
Sunny Goyal77954ba2024-03-25 11:53:17 -0700591// Build rule for Launcher3 Go app with quickstep for Android Go devices.
592// Note that the following two rules are exactly same, and should
593// eventually be merged into a single target
594android_app {
595 name: "Launcher3Go",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700596 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000597 resource_dirs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000598
599 platform_apis: true,
600 min_sdk_version: "current",
601 target_sdk_version: "current",
602
Thales Lima813834a2022-05-18 15:29:59 +0000603 optimize: {
604 proguard_flags_files: ["proguard.flags"],
605 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000606 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000607 },
608
609 privileged: true,
610 system_ext_specific: true,
611 overrides: [
612 "Home",
613 "Launcher2",
614 "Launcher3",
615 "Launcher3QuickStep",
616 ],
617 required: ["privapp_whitelist_com.android.launcher3"],
618
619 additional_manifests: [
620 "go/AndroidManifest.xml",
621 "go/AndroidManifest-launcher.xml",
622 "AndroidManifest-common.xml",
623 ],
624
625 manifest: "quickstep/AndroidManifest.xml",
626 jacoco: {
627 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800628 },
Sunny Goyal77954ba2024-03-25 11:53:17 -0700629}
Anushree Ganjambd863312024-08-23 17:15:30 -0700630
Sunny Goyal77954ba2024-03-25 11:53:17 -0700631android_app {
632 name: "Launcher3QuickStepGo",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700633 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000634 resource_dirs: [],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700635
636 platform_apis: true,
637 min_sdk_version: "current",
638 target_sdk_version: "current",
639
640 optimize: {
641 proguard_flags_files: ["proguard.flags"],
642 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000643 shrink_resources: true,
Sunny Goyal77954ba2024-03-25 11:53:17 -0700644 },
645
646 privileged: true,
647 system_ext_specific: true,
648 overrides: [
649 "Home",
650 "Launcher2",
651 "Launcher3",
652 "Launcher3QuickStep",
653 ],
654 required: ["privapp_whitelist_com.android.launcher3"],
655
656 additional_manifests: [
657 "go/AndroidManifest.xml",
658 "go/AndroidManifest-launcher.xml",
659 "AndroidManifest-common.xml",
660 ],
661
662 manifest: "quickstep/AndroidManifest.xml",
663 jacoco: {
664 include_filter: ["com.android.launcher3.*"],
665 },
Thales Lima813834a2022-05-18 15:29:59 +0000666}