blob: 9b696a26403ee03b49a21b84c07afdaa08ea38e8 [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 Gallmann6518efc2022-10-04 11:57:37 +0000156 "view_capture"
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800157 ],
158 manifest: "AndroidManifest-common.xml",
159 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700160 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000161 lint: {
162 baseline_filename: "lint-baseline-res-lib.xml",
163 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800164}
165
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800166//
167// Build rule for Launcher3 dependencies lib.
168//
169android_library {
170 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800171 srcs: ["src_build_config/**/*.java"],
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000172 static_libs: [
173 "Launcher3ResLib",
174 "launcher-testing-shared",
Kateryna Ivanova71203732023-05-24 15:09:00 +0000175 "animationlib"
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000176 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800177 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700178 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800179 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000180 lint: {
181 baseline_filename: "lint-baseline-common-deps-lib.xml",
182 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800183}
184
185//
186// Build rule for Launcher3 app.
187//
188android_app {
189 name: "Launcher3",
190
191 static_libs: [
192 "Launcher3CommonDepsLib",
193 ],
194 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000195 ":launcher-src",
196 ":launcher-src_shortcuts_overrides",
197 ":launcher-src_ui_overrides",
198 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800199 ],
200 resource_dirs: [
201 "ext_tests/res",
202 ],
203 optimize: {
204 proguard_flags_files: ["proguard.flags"],
205 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
206 enabled: false,
207 },
208
209 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700210 min_sdk_version: min_launcher3_sdk_version,
211 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800212 privileged: true,
213 system_ext_specific: true,
214
215 overrides: [
216 "Home",
217 "Launcher2",
218 ],
219 required: ["privapp_whitelist_com.android.launcher3"],
220
221 jacoco: {
222 include_filter: ["com.android.launcher3.**"],
223 },
224 additional_manifests: [
225 "AndroidManifest-common.xml",
226 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000227 lint: {
228 baseline_filename: "lint-baseline-launcher3.xml",
229 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800230}
231
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800232// Library with all the dependencies for building quickstep
233android_library {
234 name: "QuickstepResLib",
235 srcs: [ ],
236 resource_dirs: [
237 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800238 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700239 libs: [
240 "framework-statsd",
241 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800242 static_libs: [
243 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800244 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800245 "SystemUISharedLib",
246 "SystemUI-statsd",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000247 "animationlib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800248 ],
249 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700250 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800251}
252
253
Jon Spivacka65d68b2021-04-07 10:22:25 -0700254// Library with all the dependencies for building Launcher Go
255android_library {
256 name: "LauncherGoResLib",
257 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000258 ":launcher-src",
259 ":launcher-quickstep-src",
260 ":launcher-go-src",
261 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700262 ],
263 resource_dirs: [
264 "go/res",
265 "go/quickstep/res",
266 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000267 // Note the ordering here is important when it comes to resource
268 // overriding. We want the most specific resource overrides defined
269 // in QuickstepResLib to take precendece, so it should be the final
270 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700271 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000272 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700273 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700274 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700275 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700276 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700277 manifest: "quickstep/AndroidManifest-launcher.xml",
278 additional_manifests: [
279 "go/AndroidManifest.xml",
280 "AndroidManifest-common.xml",
281 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700282 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000283 lint: {
284 baseline_filename: "lint-baseline-go-res-lib.xml",
285 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700286}
287
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700288// Build rule for Quickstep library
289android_library {
290 name: "Launcher3QuickStepLib",
291 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000292 ":launcher-src",
293 ":launcher-quickstep-src",
294 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700295 ],
Thales Limac335ad22021-11-08 15:31:49 +0000296 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700297 libs: [
298 "framework-statsd",
299 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000300 // Note the ordering here is important when it comes to resource
301 // overriding. We want the most specific resource overrides defined
302 // in QuickstepResLib to take precendece, so it should be the final
303 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700304 static_libs: [
305 "SystemUI-statsd",
306 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000307 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000308 "QuickstepResLib",
Kateryna Ivanovac0a003e2023-04-26 15:12:30 +0000309 "animationlib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700310 ],
311 manifest: "quickstep/AndroidManifest.xml",
312 platform_apis: true,
313 min_sdk_version: "current",
314 lint: {
315 baseline_filename: "lint-baseline-launcher3.xml",
316 },
317}
Thales Lima813834a2022-05-18 15:29:59 +0000318
319// Build rule for Launcher3 Go app for Android Go devices.
320android_app {
321 name: "Launcher3Go",
322
323 static_libs: ["Launcher3CommonDepsLib"],
324
325 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000326 ":launcher-src",
327 ":launcher-go-src",
328 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000329 ],
330
331 resource_dirs: ["go/res"],
332
333 optimize: {
334 proguard_flags_files: ["proguard.flags"],
335 },
336
337 sdk_version: "current",
338 min_sdk_version: "current",
339 target_sdk_version: "current",
340 privileged: true,
341 system_ext_specific: true,
342 overrides: [
343 "Home",
344 "Launcher2",
345 "Launcher3",
346 "Launcher3QuickStep",
347 ],
348 required: ["privapp_whitelist_com.android.launcher3"],
349
350 additional_manifests: [
351 "AndroidManifest.xml",
352 "AndroidManifest-common.xml",
353 ],
354
355 manifest: "go/AndroidManifest.xml",
356 jacoco: {
357 include_filter: ["com.android.launcher3.*"],
358 }
359
360}
361
362// Build rule for Quickstep app.
363android_app {
364 name: "Launcher3QuickStep",
365
366 static_libs: ["Launcher3QuickStepLib"],
367 optimize: {
368 enabled: false,
369 },
370
371 platform_apis: true,
372 min_sdk_version: "current",
373 target_sdk_version: "current",
374
375 privileged: true,
376 system_ext_specific: true,
377 overrides: [
378 "Home",
379 "Launcher2",
380 "Launcher3",
381 ],
382 required: ["privapp_whitelist_com.android.launcher3"],
383
384 resource_dirs: ["quickstep/res"],
385
386 additional_manifests: [
387 "quickstep/AndroidManifest-launcher.xml",
388 "AndroidManifest-common.xml",
389 ],
390
391 manifest: "quickstep/AndroidManifest.xml",
392 jacoco: {
393 include_filter: ["com.android.launcher3.*"],
394 }
395
396}
397
398// Build rule for Launcher3 Go app with quickstep for Android Go devices.
399android_app {
400 name: "Launcher3QuickStepGo",
401
402 static_libs: [
403 "SystemUI-statsd",
404 "SystemUISharedLib",
405 "LauncherGoResLib",
406 ],
407
408 platform_apis: true,
409 min_sdk_version: "current",
410 target_sdk_version: "current",
411
Thales Lima2c54bbf2022-07-12 15:45:10 +0000412 srcs: [ ],
Thales Lima813834a2022-05-18 15:29:59 +0000413
414 resource_dirs: [
415 "go/quickstep/res",
416 "go/res",
417 "quickstep/res",
418 ],
419
420 optimize: {
421 proguard_flags_files: ["proguard.flags"],
422 enabled: true,
423 },
424
425 privileged: true,
426 system_ext_specific: true,
427 overrides: [
428 "Home",
429 "Launcher2",
430 "Launcher3",
431 "Launcher3QuickStep",
432 ],
433 required: ["privapp_whitelist_com.android.launcher3"],
434
435 additional_manifests: [
436 "go/AndroidManifest.xml",
437 "go/AndroidManifest-launcher.xml",
438 "AndroidManifest-common.xml",
439 ],
440
441 manifest: "quickstep/AndroidManifest.xml",
442 jacoco: {
443 include_filter: ["com.android.launcher3.*"],
444 }
445
446}
447