blob: 177ba1c69814b501319d51321538b9cb32d64108 [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",
Jon Miranda27f95592022-04-06 17:29:09 +000082 "SystemUIAnimationLib",
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
Edward Crosse016d582018-07-31 15:17:57 +0200139java_import {
140 name: "libGoogleFeed",
141 jars: [
142 "libs/libGoogleFeed.jar",
143 ],
144}
145
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800146// Library with all the dependencies for building Launcher3
147android_library {
148 name: "Launcher3ResLib",
149 srcs: [ ],
150 resource_dirs: ["res"],
151 static_libs: [
152 "LauncherPluginLib",
153 "launcher_quickstep_log_protos_lite",
154 "androidx-constraintlayout_constraintlayout",
155 "androidx.recyclerview_recyclerview",
156 "androidx.dynamicanimation_dynamicanimation",
157 "androidx.fragment_fragment",
158 "androidx.preference_preference",
159 "androidx.slice_slice-view",
160 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400161 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800162 "iconloader_base",
Michael Bestas3803d3a2023-03-14 04:39:27 +0200163 "view_capture",
Edward Crosse016d582018-07-31 15:17:57 +0200164 "libGoogleFeed",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800165 ],
166 manifest: "AndroidManifest-common.xml",
167 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700168 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000169 lint: {
170 baseline_filename: "lint-baseline-res-lib.xml",
171 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800172}
173
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800174//
175// Build rule for Launcher3 dependencies lib.
176//
177android_library {
178 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800179 srcs: ["src_build_config/**/*.java"],
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000180 static_libs: [
181 "Launcher3ResLib",
182 "launcher-testing-shared",
Michael Bestasce0bcfe2023-06-14 02:20:11 +0300183 "org.lineageos.platform"
Nicolo' Mazzucatoe8ee34a2023-01-24 15:41:10 +0000184 ],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800185 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700186 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800187 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000188 lint: {
189 baseline_filename: "lint-baseline-common-deps-lib.xml",
190 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800191}
192
193//
194// Build rule for Launcher3 app.
195//
196android_app {
Joey0fd94762018-10-02 17:09:53 +0200197 name: "Trebuchet",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800198
199 static_libs: [
200 "Launcher3CommonDepsLib",
201 ],
202 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000203 ":launcher-src",
204 ":launcher-src_shortcuts_overrides",
205 ":launcher-src_ui_overrides",
206 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800207 ],
208 resource_dirs: [
209 "ext_tests/res",
210 ],
211 optimize: {
212 proguard_flags_files: ["proguard.flags"],
213 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
214 enabled: false,
215 },
216
217 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700218 min_sdk_version: min_launcher3_sdk_version,
219 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800220 privileged: true,
221 system_ext_specific: true,
222
223 overrides: [
224 "Home",
225 "Launcher2",
Nolen Johnson11c9ebd2022-09-27 17:08:57 -0400226 "QuickSearchBox",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800227 ],
228 required: ["privapp_whitelist_com.android.launcher3"],
229
230 jacoco: {
231 include_filter: ["com.android.launcher3.**"],
232 },
233 additional_manifests: [
234 "AndroidManifest-common.xml",
235 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000236 lint: {
237 baseline_filename: "lint-baseline-launcher3.xml",
238 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800239}
240
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800241// Library with all the dependencies for building quickstep
242android_library {
243 name: "QuickstepResLib",
244 srcs: [ ],
245 resource_dirs: [
246 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800247 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700248 libs: [
249 "framework-statsd",
250 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800251 static_libs: [
252 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800253 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800254 "SystemUISharedLib",
255 "SystemUI-statsd",
Jon Miranda27f95592022-04-06 17:29:09 +0000256 "SystemUIAnimationLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800257 ],
258 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700259 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800260}
261
262
Jon Spivacka65d68b2021-04-07 10:22:25 -0700263// Library with all the dependencies for building Launcher Go
264android_library {
265 name: "LauncherGoResLib",
266 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000267 ":launcher-src",
268 ":launcher-quickstep-src",
269 ":launcher-go-src",
270 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700271 ],
272 resource_dirs: [
273 "go/res",
274 "go/quickstep/res",
275 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000276 // Note the ordering here is important when it comes to resource
277 // overriding. We want the most specific resource overrides defined
278 // in QuickstepResLib to take precendece, so it should be the final
279 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700280 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000281 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700282 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700283 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700284 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700285 plugins: ["androidx.room_room-compiler-plugin"],
Bruno Martins8c54c242023-10-02 23:05:29 +0100286 manifest: "go/AndroidManifest-launcher.xml",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700287 additional_manifests: [
288 "go/AndroidManifest.xml",
289 "AndroidManifest-common.xml",
290 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700291 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000292 lint: {
293 baseline_filename: "lint-baseline-go-res-lib.xml",
294 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700295}
296
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700297// Build rule for Quickstep library
298android_library {
299 name: "Launcher3QuickStepLib",
300 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000301 ":launcher-src",
302 ":launcher-quickstep-src",
303 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700304 ],
Thales Limac335ad22021-11-08 15:31:49 +0000305 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700306 libs: [
307 "framework-statsd",
308 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000309 // Note the ordering here is important when it comes to resource
310 // overriding. We want the most specific resource overrides defined
311 // in QuickstepResLib to take precendece, so it should be the final
312 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700313 static_libs: [
314 "SystemUI-statsd",
315 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000316 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000317 "QuickstepResLib",
Jon Miranda27f95592022-04-06 17:29:09 +0000318 "SystemUIAnimationLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700319 ],
320 manifest: "quickstep/AndroidManifest.xml",
321 platform_apis: true,
322 min_sdk_version: "current",
323 lint: {
324 baseline_filename: "lint-baseline-launcher3.xml",
325 },
326}
Thales Lima813834a2022-05-18 15:29:59 +0000327
328// Build rule for Launcher3 Go app for Android Go devices.
329android_app {
Michael Bestas1a99cb82022-12-06 18:04:18 +0200330 name: "TrebuchetGo",
Thales Lima813834a2022-05-18 15:29:59 +0000331
332 static_libs: ["Launcher3CommonDepsLib"],
333
334 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000335 ":launcher-src",
336 ":launcher-go-src",
337 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000338 ],
339
340 resource_dirs: ["go/res"],
341
342 optimize: {
343 proguard_flags_files: ["proguard.flags"],
344 },
345
346 sdk_version: "current",
347 min_sdk_version: "current",
348 target_sdk_version: "current",
349 privileged: true,
350 system_ext_specific: true,
351 overrides: [
352 "Home",
353 "Launcher2",
354 "Launcher3",
355 "Launcher3QuickStep",
Michael Bestas1a99cb82022-12-06 18:04:18 +0200356 "Launcher3Go",
357 "QuickSearchBox",
Thales Lima813834a2022-05-18 15:29:59 +0000358 ],
359 required: ["privapp_whitelist_com.android.launcher3"],
360
361 additional_manifests: [
362 "AndroidManifest.xml",
363 "AndroidManifest-common.xml",
364 ],
365
366 manifest: "go/AndroidManifest.xml",
367 jacoco: {
368 include_filter: ["com.android.launcher3.*"],
369 }
370
371}
372
373// Build rule for Quickstep app.
374android_app {
Michael Bestas1a99cb82022-12-06 18:04:18 +0200375 name: "TrebuchetQuickStep",
Thales Lima813834a2022-05-18 15:29:59 +0000376
377 static_libs: ["Launcher3QuickStepLib"],
378 optimize: {
379 enabled: false,
380 },
381
382 platform_apis: true,
383 min_sdk_version: "current",
384 target_sdk_version: "current",
385
386 privileged: true,
387 system_ext_specific: true,
388 overrides: [
389 "Home",
390 "Launcher2",
391 "Launcher3",
Michael Bestas1a99cb82022-12-06 18:04:18 +0200392 "Launcher3QuickStep",
393 "QuickSearchBox",
Thales Lima813834a2022-05-18 15:29:59 +0000394 ],
395 required: ["privapp_whitelist_com.android.launcher3"],
396
397 resource_dirs: ["quickstep/res"],
398
399 additional_manifests: [
400 "quickstep/AndroidManifest-launcher.xml",
401 "AndroidManifest-common.xml",
402 ],
403
404 manifest: "quickstep/AndroidManifest.xml",
405 jacoco: {
406 include_filter: ["com.android.launcher3.*"],
407 }
408
409}
410
411// Build rule for Launcher3 Go app with quickstep for Android Go devices.
412android_app {
Michael Bestas1a99cb82022-12-06 18:04:18 +0200413 name: "TrebuchetQuickStepGo",
Thales Lima813834a2022-05-18 15:29:59 +0000414
415 static_libs: [
416 "SystemUI-statsd",
417 "SystemUISharedLib",
418 "LauncherGoResLib",
419 ],
420
421 platform_apis: true,
422 min_sdk_version: "current",
423 target_sdk_version: "current",
424
Thales Lima2c54bbf2022-07-12 15:45:10 +0000425 srcs: [ ],
Thales Lima813834a2022-05-18 15:29:59 +0000426
427 resource_dirs: [
428 "go/quickstep/res",
429 "go/res",
430 "quickstep/res",
431 ],
432
433 optimize: {
434 proguard_flags_files: ["proguard.flags"],
435 enabled: true,
436 },
437
438 privileged: true,
439 system_ext_specific: true,
440 overrides: [
441 "Home",
442 "Launcher2",
443 "Launcher3",
444 "Launcher3QuickStep",
Michael Bestas1a99cb82022-12-06 18:04:18 +0200445 "Launcher3QuickStepGo",
446 "QuickSearchBox",
Thales Lima813834a2022-05-18 15:29:59 +0000447 ],
448 required: ["privapp_whitelist_com.android.launcher3"],
449
450 additional_manifests: [
451 "go/AndroidManifest.xml",
452 "go/AndroidManifest-launcher.xml",
453 "AndroidManifest-common.xml",
454 ],
455
456 manifest: "quickstep/AndroidManifest.xml",
457 jacoco: {
458 include_filter: ["com.android.launcher3.*"],
459 }
460
461}
462