blob: 6cd559b6472b6f54888ce62940c55b266378ed2f [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 Goyal1fb271f2021-05-20 10:43:23 -070020min_launcher3_sdk_version = "26"
21
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
24filegroup {
25 name: "launcher-src",
26 srcs: [ "src/**/*.java", "src/**/*.kt" ],
27}
28
29filegroup {
30 name: "launcher-quickstep-src",
31 srcs: [ "quickstep/src/**/*.java", "quickstep/src/**/*.kt" ],
32}
33
34filegroup {
35 name: "launcher-go-src",
36 srcs: [ "go/src/**/*.java", "go/src/**/*.kt" ],
37}
38
39filegroup {
40 name: "launcher-go-quickstep-src",
41 srcs: [ "go/quickstep/src/**/*.java", "go/quickstep/src/**/*.kt" ],
42}
43
44filegroup {
45 name: "launcher-src_shortcuts_overrides",
46 srcs: [ "src_shortcuts_overrides/**/*.java", "src_shortcuts_overrides/**/*.kt" ],
47}
48
49filegroup {
50 name: "launcher-src_ui_overrides",
51 srcs: [ "src_ui_overrides/**/*.java", "src_ui_overrides/**/*.kt" ],
52}
53
54filegroup {
55 name: "launcher-ext_tests",
56 srcs: [ "ext_tests/**/*.java", "ext_tests/**/*.kt" ],
57}
58
59filegroup {
60 name: "launcher-quickstep-ext_tests",
61 srcs: [ "quickstep/ext_tests/**/*.java", "quickstep/ext_tests/**/*.kt" ],
62}
63
64// Proguard files for Launcher3
65filegroup {
66 name: "launcher-proguard-rules",
67 srcs: ["proguard.flags"],
68}
69
vadimt09df0832019-03-07 14:59:30 -080070android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070071 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -070072 libs: [
73 "framework-statsd",
74 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070075 static_libs: [
76 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -070077 "androidx.test.runner",
78 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070079 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -070080 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070081 "SystemUISharedLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +000082 "animationlib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +000083 "launcher-testing-shared",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070084 ],
85 srcs: [
86 "tests/tapl/**/*.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070087 ],
Sunny Goyal572aca42021-03-24 15:21:39 -070088 resource_dirs: [ ],
vadimt09df0832019-03-07 14:59:30 -080089 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070090 platform_apis: true,
91}
thiruram5e1ecf62019-11-13 17:49:35 -080092
93java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080094 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080095 srcs: [
96 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080097 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080098 ],
99 sdk_version: "current",
100 proto: {
101 type: "lite",
102 local_include_dirs:[
103 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800104 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800105 ],
106 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800107 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800108}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800109
thiruramcbeb13d2021-01-27 14:45:58 -0800110java_library_static {
111 name: "launcher_quickstep_log_protos_lite",
112 srcs: [
113 "quickstep/protos_overrides/*.proto",
114 ],
115 sdk_version: "current",
116 proto: {
117 type: "lite",
118 local_include_dirs:[
119 "quickstep/protos_overrides",
120 ],
121 },
122 static_libs: [
123 "libprotobuf-java-lite",
124 "launcher_log_protos_lite"
125 ],
126}
127
Hyunyoung Song8605be32020-02-21 14:52:25 -0800128java_library {
129 name: "LauncherPluginLib",
130
131 static_libs: ["PluginCoreLib"],
132
133 srcs: ["src_plugins/**/*.java"],
134
135 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700136 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800137}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800138
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800139// Library with all the dependencies for building Launcher3
140android_library {
141 name: "Launcher3ResLib",
142 srcs: [ ],
143 resource_dirs: ["res"],
144 static_libs: [
145 "LauncherPluginLib",
146 "launcher_quickstep_log_protos_lite",
147 "androidx-constraintlayout_constraintlayout",
148 "androidx.recyclerview_recyclerview",
149 "androidx.dynamicanimation_dynamicanimation",
150 "androidx.fragment_fragment",
151 "androidx.preference_preference",
152 "androidx.slice_slice-view",
153 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400154 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800155 "iconloader_base",
Johannes Gallmanna82eebd2023-07-21 18:02:07 +0200156 "view_capture",
157 "animationlib"
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800158 ],
159 manifest: "AndroidManifest-common.xml",
160 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700161 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000162 lint: {
163 baseline_filename: "lint-baseline-res-lib.xml",
164 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800165}
166
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800167//
168// Build rule for Launcher3 dependencies lib.
169//
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700170android_library {
171 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800172 srcs: ["src_build_config/**/*.java"],
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000173 static_libs: [
174 "Launcher3ResLib",
175 "launcher-testing-shared",
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700176 "animationlib",
177 "com_android_launcher3_flags_lib",
Jeremy Sim9e44e372023-10-10 14:54:39 -0700178 "com_android_wm_shell_flags_lib",
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000179 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800180 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700181 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800182 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000183 lint: {
184 baseline_filename: "lint-baseline-common-deps-lib.xml",
185 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800186}
187
188//
189// Build rule for Launcher3 app.
190//
191android_app {
192 name: "Launcher3",
193
194 static_libs: [
Anushree Ganjam2a14b972023-08-30 13:31:10 -0700195 "Launcher3CommonDepsLib",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800196 ],
197 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000198 ":launcher-src",
199 ":launcher-src_shortcuts_overrides",
200 ":launcher-src_ui_overrides",
201 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800202 ],
203 resource_dirs: [
204 "ext_tests/res",
205 ],
206 optimize: {
207 proguard_flags_files: ["proguard.flags"],
208 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
209 enabled: false,
210 },
211
212 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700213 min_sdk_version: min_launcher3_sdk_version,
214 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800215 privileged: true,
216 system_ext_specific: true,
217
218 overrides: [
219 "Home",
220 "Launcher2",
221 ],
222 required: ["privapp_whitelist_com.android.launcher3"],
223
224 jacoco: {
225 include_filter: ["com.android.launcher3.**"],
226 },
227 additional_manifests: [
228 "AndroidManifest-common.xml",
229 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000230 lint: {
231 baseline_filename: "lint-baseline-launcher3.xml",
232 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800233}
234
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800235// Library with all the dependencies for building quickstep
236android_library {
237 name: "QuickstepResLib",
238 srcs: [ ],
239 resource_dirs: [
240 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800241 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700242 libs: [
243 "framework-statsd",
244 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800245 static_libs: [
246 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800247 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800248 "SystemUISharedLib",
249 "SystemUI-statsd",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000250 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800251 ],
252 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700253 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800254}
255
256
Jon Spivacka65d68b2021-04-07 10:22:25 -0700257// Library with all the dependencies for building Launcher Go
258android_library {
259 name: "LauncherGoResLib",
260 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000261 ":launcher-src",
262 ":launcher-quickstep-src",
263 ":launcher-go-src",
264 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700265 ],
266 resource_dirs: [
267 "go/res",
268 "go/quickstep/res",
269 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000270 // Note the ordering here is important when it comes to resource
271 // overriding. We want the most specific resource overrides defined
272 // in QuickstepResLib to take precendece, so it should be the final
273 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700274 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000275 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700276 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700277 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700278 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700279 plugins: ["androidx.room_room-compiler-plugin"],
Arvind Kumar384a0ed2023-07-07 09:41:29 +0530280 manifest: "quickstep/AndroidManifest.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700281 additional_manifests: [
282 "go/AndroidManifest.xml",
283 "AndroidManifest-common.xml",
284 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700285 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000286 lint: {
287 baseline_filename: "lint-baseline-go-res-lib.xml",
288 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700289}
290
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700291// Build rule for Quickstep library
292android_library {
293 name: "Launcher3QuickStepLib",
294 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000295 ":launcher-src",
296 ":launcher-quickstep-src",
297 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700298 ],
Thales Limac335ad22021-11-08 15:31:49 +0000299 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700300 libs: [
301 "framework-statsd",
302 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000303 // Note the ordering here is important when it comes to resource
304 // overriding. We want the most specific resource overrides defined
305 // in QuickstepResLib to take precendece, so it should be the final
306 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700307 static_libs: [
308 "SystemUI-statsd",
309 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000310 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000311 "QuickstepResLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000312 "animationlib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700313 ],
314 manifest: "quickstep/AndroidManifest.xml",
315 platform_apis: true,
316 min_sdk_version: "current",
317 lint: {
318 baseline_filename: "lint-baseline-launcher3.xml",
319 },
320}
Thales Lima813834a2022-05-18 15:29:59 +0000321
322// Build rule for Launcher3 Go app for Android Go devices.
323android_app {
324 name: "Launcher3Go",
325
326 static_libs: ["Launcher3CommonDepsLib"],
327
328 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000329 ":launcher-src",
330 ":launcher-go-src",
331 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000332 ],
333
334 resource_dirs: ["go/res"],
335
336 optimize: {
337 proguard_flags_files: ["proguard.flags"],
338 },
339
340 sdk_version: "current",
341 min_sdk_version: "current",
342 target_sdk_version: "current",
343 privileged: true,
344 system_ext_specific: true,
345 overrides: [
346 "Home",
347 "Launcher2",
348 "Launcher3",
349 "Launcher3QuickStep",
350 ],
351 required: ["privapp_whitelist_com.android.launcher3"],
352
353 additional_manifests: [
354 "AndroidManifest.xml",
355 "AndroidManifest-common.xml",
356 ],
357
358 manifest: "go/AndroidManifest.xml",
359 jacoco: {
360 include_filter: ["com.android.launcher3.*"],
361 }
362
363}
364
365// Build rule for Quickstep app.
366android_app {
367 name: "Launcher3QuickStep",
368
369 static_libs: ["Launcher3QuickStepLib"],
370 optimize: {
371 enabled: false,
372 },
373
374 platform_apis: true,
375 min_sdk_version: "current",
376 target_sdk_version: "current",
377
378 privileged: true,
379 system_ext_specific: true,
380 overrides: [
381 "Home",
382 "Launcher2",
383 "Launcher3",
384 ],
385 required: ["privapp_whitelist_com.android.launcher3"],
386
387 resource_dirs: ["quickstep/res"],
388
389 additional_manifests: [
390 "quickstep/AndroidManifest-launcher.xml",
391 "AndroidManifest-common.xml",
392 ],
393
394 manifest: "quickstep/AndroidManifest.xml",
395 jacoco: {
396 include_filter: ["com.android.launcher3.*"],
397 }
398
399}
400
401// Build rule for Launcher3 Go app with quickstep for Android Go devices.
402android_app {
403 name: "Launcher3QuickStepGo",
404
405 static_libs: [
406 "SystemUI-statsd",
407 "SystemUISharedLib",
408 "LauncherGoResLib",
409 ],
410
411 platform_apis: true,
412 min_sdk_version: "current",
413 target_sdk_version: "current",
414
Thales Lima2c54bbf2022-07-12 15:45:10 +0000415 srcs: [ ],
Thales Lima813834a2022-05-18 15:29:59 +0000416
417 resource_dirs: [
418 "go/quickstep/res",
419 "go/res",
420 "quickstep/res",
421 ],
422
423 optimize: {
424 proguard_flags_files: ["proguard.flags"],
425 enabled: true,
426 },
427
428 privileged: true,
429 system_ext_specific: true,
430 overrides: [
431 "Home",
432 "Launcher2",
433 "Launcher3",
434 "Launcher3QuickStep",
435 ],
436 required: ["privapp_whitelist_com.android.launcher3"],
437
438 additional_manifests: [
439 "go/AndroidManifest.xml",
440 "go/AndroidManifest-launcher.xml",
441 "AndroidManifest-common.xml",
442 ],
443
444 manifest: "quickstep/AndroidManifest.xml",
445 jacoco: {
446 include_filter: ["com.android.launcher3.*"],
447 }
448
449}
450