blob: 6bd8602a3ba1ae4112fa5c0fb1772ac08a7ea2a5 [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",
Juan Sebastian Martinez9c774c42024-11-08 08:38:11 -0800390 "//frameworks/libs/systemui:msdl",
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000391 "SystemUI-statsd",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000392 "launcher-testing-shared",
Uwais Ashraf6e9927e2024-03-25 10:53:06 +0000393 "androidx.lifecycle_lifecycle-common-java8",
394 "androidx.lifecycle_lifecycle-extensions",
395 "androidx.lifecycle_lifecycle-runtime-ktx",
396 "kotlinx_coroutines_android",
397 "kotlinx_coroutines",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700398 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700399 "com_android_wm_shell_flags_lib",
Anushree Ganjambd863312024-08-23 17:15:30 -0700400 "dagger2",
401 "jsr330",
George Linde4d7452024-08-27 16:57:32 +0000402 "com_android_systemui_shared_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000403 ],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700404 manifest: "AndroidManifest-common.xml",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800405 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700406 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000407 lint: {
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700408 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000409 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800410}
411
412//
413// Build rule for Launcher3 app.
414//
415android_app {
416 name: "Launcher3",
Jared Duke1222dd72024-07-12 00:01:11 +0000417 defaults: ["launcher-non-platform-apis-defaults"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800418
419 static_libs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700420 "Launcher3ResLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800421 ],
422 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000423 ":launcher-src",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700424 ":launcher-src_no_quickstep",
425 ":launcher-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800426 ],
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700427
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800428 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000429 proguard_flags_files: [":launcher-proguard-rules"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800430 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
431 enabled: false,
432 },
433
434 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700435 min_sdk_version: min_launcher3_sdk_version,
436 target_sdk_version: "current",
Anushree Ganjambd863312024-08-23 17:15:30 -0700437 plugins: ["dagger2-compiler"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800438 privileged: true,
439 system_ext_specific: true,
440
441 overrides: [
442 "Home",
443 "Launcher2",
444 ],
445 required: ["privapp_whitelist_com.android.launcher3"],
446
447 jacoco: {
448 include_filter: ["com.android.launcher3.**"],
449 },
450 additional_manifests: [
451 "AndroidManifest-common.xml",
452 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000453 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800454 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000455 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800456}
457
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800458// Library with all the dependencies for building quickstep
459android_library {
460 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800461 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800462 resource_dirs: [
463 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800464 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700465 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000466 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700467 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800468 static_libs: [
469 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800470 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800471 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000472 "SettingsLibSettingsTheme",
Anushree Ganjambd863312024-08-23 17:15:30 -0700473 "dagger2",
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400474 "protolog-group",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800475 ],
476 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700477 min_sdk_version: "current",
Sam Cackett65936222024-12-10 16:39:36 +0000478 lint: {
479 disabled_checks: ["MissingClass"],
480 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800481}
482
Sunny Goyal77954ba2024-03-25 11:53:17 -0700483// Library with all the source code and dependencies for building Launcher Go
Jon Spivacka65d68b2021-04-07 10:22:25 -0700484android_library {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700485 name: "Launcher3GoLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100486 defaults: [
487 "launcher_compose_defaults",
488 "quickstep_compose_defaults",
489 ],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700490 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000491 ":launcher-src",
492 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700493 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700494 "go/quickstep/src/**/*.java",
495 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700496 ],
497 resource_dirs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700498 "go/quickstep/res",
499 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000500 // Note the ordering here is important when it comes to resource
501 // overriding. We want the most specific resource overrides defined
502 // in QuickstepResLib to take precendece, so it should be the final
503 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700504 static_libs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700505 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700506 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700507 ],
Anushree Ganjambd863312024-08-23 17:15:30 -0700508 plugins: [
509 "androidx.room_room-compiler-plugin",
510 "dagger2-compiler",
511 ],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530512 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700513 additional_manifests: [
514 "go/AndroidManifest.xml",
515 "AndroidManifest-common.xml",
516 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700517 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800518 // TODO(b/319712088): re-enable use_resource_processor
519 use_resource_processor: false,
Jon Spivacka65d68b2021-04-07 10:22:25 -0700520}
521
Sunny Goyal77954ba2024-03-25 11:53:17 -0700522// Library with all the source code and dependencies for building Quickstep
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700523android_library {
524 name: "Launcher3QuickStepLib",
Jordan Silva4afa1952024-08-06 16:54:59 +0100525 defaults: [
526 "launcher_compose_defaults",
Anushree Ganjambd863312024-08-23 17:15:30 -0700527 "quickstep_compose_defaults",
Jordan Silva4afa1952024-08-06 16:54:59 +0100528 ],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700529 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000530 ":launcher-src",
531 ":launcher-quickstep-src",
Anushree Ganjam14721d12024-08-29 10:05:12 -0700532 ":launcher-quickstep-dagger",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700533 ":launcher-build-config",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700534 ],
Thales Limac335ad22021-11-08 15:31:49 +0000535 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700536 libs: [
Jihoon Kang9f8e4b62024-08-30 00:29:41 +0000537 "framework-statsd.stubs.module_lib",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700538 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000539 // Note the ordering here is important when it comes to resource
540 // overriding. We want the most specific resource overrides defined
541 // in QuickstepResLib to take precendece, so it should be the final
542 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700543 static_libs: [
544 "SystemUI-statsd",
Ben Murdochfabc8732021-12-02 18:22:17 +0000545 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700546 ],
547 manifest: "quickstep/AndroidManifest.xml",
548 platform_apis: true,
Anushree Ganjambd863312024-08-23 17:15:30 -0700549 plugins: ["dagger2-compiler"],
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700550 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800551 // TODO(b/319712088): re-enable use_resource_processor
552 use_resource_processor: false,
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700553}
Thales Lima813834a2022-05-18 15:29:59 +0000554
Thales Lima813834a2022-05-18 15:29:59 +0000555// Build rule for Quickstep app.
556android_app {
557 name: "Launcher3QuickStep",
Thales Lima813834a2022-05-18 15:29:59 +0000558 static_libs: ["Launcher3QuickStepLib"],
559 optimize: {
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000560 proguard_flags_files: [":launcher-proguard-rules"],
561 enabled: true,
562 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000563 },
564
565 platform_apis: true,
566 min_sdk_version: "current",
567 target_sdk_version: "current",
568
569 privileged: true,
570 system_ext_specific: true,
571 overrides: [
572 "Home",
573 "Launcher2",
574 "Launcher3",
575 ],
Schneider Victor-Tulias00b69962024-09-23 13:34:25 -0400576 required: [
577 "privapp_whitelist_com.android.launcher3",
578 "launcher.quickstep.protolog.pb",
579 ],
Thales Lima813834a2022-05-18 15:29:59 +0000580
581 resource_dirs: ["quickstep/res"],
582
583 additional_manifests: [
584 "quickstep/AndroidManifest-launcher.xml",
585 "AndroidManifest-common.xml",
586 ],
587
588 manifest: "quickstep/AndroidManifest.xml",
589 jacoco: {
590 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800591 },
Thales Lima813834a2022-05-18 15:29:59 +0000592
593}
594
Sunny Goyal77954ba2024-03-25 11:53:17 -0700595// Build rule for Launcher3 Go app with quickstep for Android Go devices.
596// Note that the following two rules are exactly same, and should
597// eventually be merged into a single target
598android_app {
599 name: "Launcher3Go",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700600 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000601 resource_dirs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000602
603 platform_apis: true,
604 min_sdk_version: "current",
605 target_sdk_version: "current",
606
Thales Lima813834a2022-05-18 15:29:59 +0000607 optimize: {
608 proguard_flags_files: ["proguard.flags"],
609 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000610 shrink_resources: true,
Thales Lima813834a2022-05-18 15:29:59 +0000611 },
612
613 privileged: true,
614 system_ext_specific: true,
615 overrides: [
616 "Home",
617 "Launcher2",
618 "Launcher3",
619 "Launcher3QuickStep",
620 ],
621 required: ["privapp_whitelist_com.android.launcher3"],
622
623 additional_manifests: [
624 "go/AndroidManifest.xml",
625 "go/AndroidManifest-launcher.xml",
626 "AndroidManifest-common.xml",
627 ],
628
629 manifest: "quickstep/AndroidManifest.xml",
630 jacoco: {
631 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800632 },
Sunny Goyal77954ba2024-03-25 11:53:17 -0700633}
Anushree Ganjambd863312024-08-23 17:15:30 -0700634
Sunny Goyal77954ba2024-03-25 11:53:17 -0700635android_app {
636 name: "Launcher3QuickStepGo",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700637 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000638 resource_dirs: [],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700639
640 platform_apis: true,
641 min_sdk_version: "current",
642 target_sdk_version: "current",
643
644 optimize: {
645 proguard_flags_files: ["proguard.flags"],
646 enabled: true,
Jordan Silva6a8d81a2024-07-08 13:29:48 +0000647 shrink_resources: true,
Sunny Goyal77954ba2024-03-25 11:53:17 -0700648 },
649
650 privileged: true,
651 system_ext_specific: true,
652 overrides: [
653 "Home",
654 "Launcher2",
655 "Launcher3",
656 "Launcher3QuickStep",
657 ],
658 required: ["privapp_whitelist_com.android.launcher3"],
659
660 additional_manifests: [
661 "go/AndroidManifest.xml",
662 "go/AndroidManifest-launcher.xml",
663 "AndroidManifest-common.xml",
664 ],
665
666 manifest: "quickstep/AndroidManifest.xml",
667 jacoco: {
668 include_filter: ["com.android.launcher3.*"],
669 },
Thales Lima813834a2022-05-18 15:29:59 +0000670}