blob: c661986c9e1b6d9a15645fccb2332406de345758 [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 Goyal9d2ece12024-03-22 13:52:19 -070020min_launcher3_sdk_version = "30"
Sunny Goyal1fb271f2021-05-20 10:43:23 -070021
Thales Lima2c54bbf2022-07-12 15:45:10 +000022// Common source files used to build launcher (java and kotlin)
23// All sources are split so they can be reused in many other libraries/apps in other folders
Sunny Goyal77954ba2024-03-25 11:53:17 -070024
25// Main Launcher source, excluding the build config
Thales Lima2c54bbf2022-07-12 15:45:10 +000026filegroup {
27 name: "launcher-src",
Cole Faustbad33e62023-12-20 11:57:04 -080028 srcs: [
29 "src/**/*.java",
30 "src/**/*.kt",
31 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000032}
33
Sunny Goyal77954ba2024-03-25 11:53:17 -070034// Source code for quickstep build, on top of launcher-src
Thales Lima2c54bbf2022-07-12 15:45:10 +000035filegroup {
36 name: "launcher-quickstep-src",
Cole Faustbad33e62023-12-20 11:57:04 -080037 srcs: [
38 "quickstep/src/**/*.java",
39 "quickstep/src/**/*.kt",
40 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000041}
42
Sunny Goyal77954ba2024-03-25 11:53:17 -070043// Alternate source when quickstep is not included
Thales Lima2c54bbf2022-07-12 15:45:10 +000044filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -070045 name: "launcher-src_no_quickstep",
Cole Faustbad33e62023-12-20 11:57:04 -080046 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -070047 "src_no_quickstep/**/*.java",
48 "src_no_quickstep/**/*.kt",
Cole Faustbad33e62023-12-20 11:57:04 -080049 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000050}
51
Sunny Goyal77954ba2024-03-25 11:53:17 -070052// Default build config for Launcher3
Thales Lima2c54bbf2022-07-12 15:45:10 +000053filegroup {
Sunny Goyal77954ba2024-03-25 11:53:17 -070054 name: "launcher-build-config",
Cole Faustbad33e62023-12-20 11:57:04 -080055 srcs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -070056 "src_build_config/**/*.java",
Cole Faustbad33e62023-12-20 11:57:04 -080057 ],
Thales Lima2c54bbf2022-07-12 15:45:10 +000058}
59
Thales Lima2c54bbf2022-07-12 15:45:10 +000060// Proguard files for Launcher3
61filegroup {
62 name: "launcher-proguard-rules",
63 srcs: ["proguard.flags"],
64}
65
vadimt09df0832019-03-07 14:59:30 -080066android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070067 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -070068 libs: [
69 "framework-statsd",
70 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070071 static_libs: [
72 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -070073 "androidx.test.runner",
74 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070075 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -070076 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070077 "SystemUISharedLib",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -070078 "//frameworks/libs/systemui:animationlib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +000079 "launcher-testing-shared",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070080 ],
81 srcs: [
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +000082 "tests/tapl/**/*.java",
83 "tests/tapl/**/*.kt",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070084 ],
Cole Faustbad33e62023-12-20 11:57:04 -080085 resource_dirs: [],
Uwais Ashraf9c2f5a42024-03-04 09:49:39 +000086 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070087 platform_apis: true,
88}
thiruram5e1ecf62019-11-13 17:49:35 -080089
90java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080091 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080092 srcs: [
93 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080094 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080095 ],
96 sdk_version: "current",
97 proto: {
98 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -080099 local_include_dirs: [
thiruram5e1ecf62019-11-13 17:49:35 -0800100 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800101 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800102 ],
103 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800104 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800105}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800106
thiruramcbeb13d2021-01-27 14:45:58 -0800107java_library_static {
108 name: "launcher_quickstep_log_protos_lite",
109 srcs: [
110 "quickstep/protos_overrides/*.proto",
111 ],
112 sdk_version: "current",
113 proto: {
114 type: "lite",
Cole Faustbad33e62023-12-20 11:57:04 -0800115 local_include_dirs: [
thiruramcbeb13d2021-01-27 14:45:58 -0800116 "quickstep/protos_overrides",
117 ],
118 },
119 static_libs: [
Cole Faustbad33e62023-12-20 11:57:04 -0800120 "libprotobuf-java-lite",
121 "launcher_log_protos_lite",
122 ],
thiruramcbeb13d2021-01-27 14:45:58 -0800123}
124
Hyunyoung Song8605be32020-02-21 14:52:25 -0800125java_library {
126 name: "LauncherPluginLib",
127
128 static_libs: ["PluginCoreLib"],
129
130 srcs: ["src_plugins/**/*.java"],
131
132 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700133 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800134}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800135
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800136// Library with all the dependencies for building Launcher3
137android_library {
138 name: "Launcher3ResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800139 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800140 resource_dirs: ["res"],
141 static_libs: [
142 "LauncherPluginLib",
143 "launcher_quickstep_log_protos_lite",
Hyunyoung Song5d095ec2024-04-15 08:42:29 +0000144 "android.os.flags-aconfig-java",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800145 "androidx-constraintlayout_constraintlayout",
146 "androidx.recyclerview_recyclerview",
147 "androidx.dynamicanimation_dynamicanimation",
148 "androidx.fragment_fragment",
149 "androidx.preference_preference",
150 "androidx.slice_slice-view",
151 "androidx.cardview_cardview",
Sebastian Franco9ae40322023-10-10 10:50:28 -0700152 "androidx.window_window",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400153 "com.google.android.material_material",
Peter Kalauskas9bdb1da2024-04-02 15:38:57 -0700154 "//frameworks/libs/systemui:iconloader_base",
155 "//frameworks/libs/systemui:view_capture",
156 "//frameworks/libs/systemui:animationlib",
Anna Zhuravleva9c203812023-11-20 18:30:35 +0000157 "SystemUI-statsd",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000158 "launcher-testing-shared",
Uwais Ashraf6e9927e2024-03-25 10:53:06 +0000159 "androidx.lifecycle_lifecycle-common-java8",
160 "androidx.lifecycle_lifecycle-extensions",
161 "androidx.lifecycle_lifecycle-runtime-ktx",
162 "kotlinx_coroutines_android",
163 "kotlinx_coroutines",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700164 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700165 "com_android_wm_shell_flags_lib",
Willie Koomsonfedc18e2023-11-07 22:31:46 +0000166 "android.appwidget.flags-aconfig-java",
Eghosa Ewansiha-Vlachavas80232ea2024-02-20 16:08:45 +0000167 "com.android.window.flags.window-aconfig-java",
maxwen8fd65a52022-11-18 16:17:14 +0100168 "OmniPreferenceTheme",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000169 ],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700170 manifest: "AndroidManifest-common.xml",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800171 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700172 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000173 lint: {
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700174 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000175 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800176}
177
178//
179// Build rule for Launcher3 app.
180//
181android_app {
182 name: "Launcher3",
183
184 static_libs: [
Sunny Goyal77954ba2024-03-25 11:53:17 -0700185 "Launcher3ResLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800186 ],
187 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000188 ":launcher-src",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700189 ":launcher-src_no_quickstep",
190 ":launcher-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800191 ],
Sunny Goyal9d2ece12024-03-22 13:52:19 -0700192
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800193 optimize: {
194 proguard_flags_files: ["proguard.flags"],
195 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
196 enabled: false,
197 },
198
199 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700200 min_sdk_version: min_launcher3_sdk_version,
201 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800202 privileged: true,
203 system_ext_specific: true,
204
205 overrides: [
206 "Home",
207 "Launcher2",
208 ],
209 required: ["privapp_whitelist_com.android.launcher3"],
210
211 jacoco: {
212 include_filter: ["com.android.launcher3.**"],
213 },
214 additional_manifests: [
215 "AndroidManifest-common.xml",
216 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000217 lint: {
Cole Faustc778a672024-01-10 12:30:39 -0800218 baseline_filename: "lint-baseline.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000219 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800220}
221
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800222// Library with all the dependencies for building quickstep
223android_library {
224 name: "QuickstepResLib",
Cole Faustbad33e62023-12-20 11:57:04 -0800225 srcs: [],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800226 resource_dirs: [
227 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800228 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700229 libs: [
230 "framework-statsd",
231 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800232 static_libs: [
233 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800234 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800235 "SystemUISharedLib",
Jagrut Desaifae321c2023-10-30 20:30:39 +0000236 "SettingsLibSettingsTheme",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800237 ],
238 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700239 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800240}
241
Sunny Goyal77954ba2024-03-25 11:53:17 -0700242// Library with all the source code and dependencies for building Launcher Go
Jon Spivacka65d68b2021-04-07 10:22:25 -0700243android_library {
Sunny Goyal77954ba2024-03-25 11:53:17 -0700244 name: "Launcher3GoLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700245 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000246 ":launcher-src",
247 ":launcher-quickstep-src",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700248 "go/quickstep/src/**/*.java",
249 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700250 ],
251 resource_dirs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700252 "go/quickstep/res",
253 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000254 // Note the ordering here is important when it comes to resource
255 // overriding. We want the most specific resource overrides defined
256 // in QuickstepResLib to take precendece, so it should be the final
257 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700258 static_libs: [
Jon Spivacka65d68b2021-04-07 10:22:25 -0700259 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700260 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700261 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700262 plugins: ["androidx.room_room-compiler-plugin"],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530263 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700264 additional_manifests: [
265 "go/AndroidManifest.xml",
266 "AndroidManifest-common.xml",
267 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700268 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800269 // TODO(b/319712088): re-enable use_resource_processor
270 use_resource_processor: false,
Jon Spivacka65d68b2021-04-07 10:22:25 -0700271}
272
Sunny Goyal77954ba2024-03-25 11:53:17 -0700273// Library with all the source code and dependencies for building Quickstep
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700274android_library {
275 name: "Launcher3QuickStepLib",
276 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000277 ":launcher-src",
278 ":launcher-quickstep-src",
Sunny Goyal77954ba2024-03-25 11:53:17 -0700279 ":launcher-build-config",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700280 ],
Thales Limac335ad22021-11-08 15:31:49 +0000281 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700282 libs: [
283 "framework-statsd",
284 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000285 // Note the ordering here is important when it comes to resource
286 // overriding. We want the most specific resource overrides defined
287 // in QuickstepResLib to take precendece, so it should be the final
288 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700289 static_libs: [
290 "SystemUI-statsd",
Ben Murdochfabc8732021-12-02 18:22:17 +0000291 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700292 ],
293 manifest: "quickstep/AndroidManifest.xml",
294 platform_apis: true,
295 min_sdk_version: "current",
Colin Crossf156b6b2024-01-11 14:03:12 -0800296 // TODO(b/319712088): re-enable use_resource_processor
297 use_resource_processor: false,
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700298}
Thales Lima813834a2022-05-18 15:29:59 +0000299
Thales Lima813834a2022-05-18 15:29:59 +0000300// Build rule for Quickstep app.
301android_app {
302 name: "Launcher3QuickStep",
303
304 static_libs: ["Launcher3QuickStepLib"],
305 optimize: {
306 enabled: false,
307 },
308
309 platform_apis: true,
310 min_sdk_version: "current",
311 target_sdk_version: "current",
312
313 privileged: true,
314 system_ext_specific: true,
315 overrides: [
316 "Home",
317 "Launcher2",
318 "Launcher3",
319 ],
320 required: ["privapp_whitelist_com.android.launcher3"],
321
322 resource_dirs: ["quickstep/res"],
323
324 additional_manifests: [
325 "quickstep/AndroidManifest-launcher.xml",
326 "AndroidManifest-common.xml",
327 ],
328
329 manifest: "quickstep/AndroidManifest.xml",
330 jacoco: {
331 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800332 },
Thales Lima813834a2022-05-18 15:29:59 +0000333
334}
335
Thales Lima813834a2022-05-18 15:29:59 +0000336
Sunny Goyal77954ba2024-03-25 11:53:17 -0700337// Build rule for Launcher3 Go app with quickstep for Android Go devices.
338// Note that the following two rules are exactly same, and should
339// eventually be merged into a single target
340android_app {
341 name: "Launcher3Go",
342
343 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000344 resource_dirs: [],
Thales Lima813834a2022-05-18 15:29:59 +0000345
346 platform_apis: true,
347 min_sdk_version: "current",
348 target_sdk_version: "current",
349
Thales Lima813834a2022-05-18 15:29:59 +0000350 optimize: {
351 proguard_flags_files: ["proguard.flags"],
352 enabled: true,
353 },
354
355 privileged: true,
356 system_ext_specific: true,
357 overrides: [
358 "Home",
359 "Launcher2",
360 "Launcher3",
361 "Launcher3QuickStep",
362 ],
363 required: ["privapp_whitelist_com.android.launcher3"],
364
365 additional_manifests: [
366 "go/AndroidManifest.xml",
367 "go/AndroidManifest-launcher.xml",
368 "AndroidManifest-common.xml",
369 ],
370
371 manifest: "quickstep/AndroidManifest.xml",
372 jacoco: {
373 include_filter: ["com.android.launcher3.*"],
Cole Faustbad33e62023-12-20 11:57:04 -0800374 },
Sunny Goyal77954ba2024-03-25 11:53:17 -0700375}
376android_app {
377 name: "Launcher3QuickStepGo",
Thales Lima813834a2022-05-18 15:29:59 +0000378
Sunny Goyal77954ba2024-03-25 11:53:17 -0700379 static_libs: ["Launcher3GoLib"],
Sunny Goyal3b452f52024-04-12 19:16:19 +0000380 resource_dirs: [],
Sunny Goyal77954ba2024-03-25 11:53:17 -0700381
382 platform_apis: true,
383 min_sdk_version: "current",
384 target_sdk_version: "current",
385
386 optimize: {
387 proguard_flags_files: ["proguard.flags"],
388 enabled: true,
389 },
390
391 privileged: true,
392 system_ext_specific: true,
393 overrides: [
394 "Home",
395 "Launcher2",
396 "Launcher3",
397 "Launcher3QuickStep",
398 ],
399 required: ["privapp_whitelist_com.android.launcher3"],
400
401 additional_manifests: [
402 "go/AndroidManifest.xml",
403 "go/AndroidManifest-launcher.xml",
404 "AndroidManifest-common.xml",
405 ],
406
407 manifest: "quickstep/AndroidManifest.xml",
408 jacoco: {
409 include_filter: ["com.android.launcher3.*"],
410 },
Thales Lima813834a2022-05-18 15:29:59 +0000411}