blob: 097b49ac515a052e0b9cf94418c386cf7107cd98 [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",
Benno Lin2e35f512022-10-29 00:28:42 +000083 "health-testing-utils",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070084 ],
85 srcs: [
86 "tests/tapl/**/*.java",
vadimtf6ef8792022-07-26 13:54:31 -070087 "src/com/android/launcher3/testing/shared/**/*.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070088 ],
Sunny Goyal572aca42021-03-24 15:21:39 -070089 resource_dirs: [ ],
vadimt09df0832019-03-07 14:59:30 -080090 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070091 platform_apis: true,
92}
thiruram5e1ecf62019-11-13 17:49:35 -080093
94java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080095 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080096 srcs: [
97 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080098 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080099 ],
100 sdk_version: "current",
101 proto: {
102 type: "lite",
103 local_include_dirs:[
104 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -0800105 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -0800106 ],
107 },
thiruramc1c2bfa2020-02-04 18:56:40 -0800108 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -0800109}
Hyunyoung Song8605be32020-02-21 14:52:25 -0800110
thiruramcbeb13d2021-01-27 14:45:58 -0800111java_library_static {
112 name: "launcher_quickstep_log_protos_lite",
113 srcs: [
114 "quickstep/protos_overrides/*.proto",
115 ],
116 sdk_version: "current",
117 proto: {
118 type: "lite",
119 local_include_dirs:[
120 "quickstep/protos_overrides",
121 ],
122 },
123 static_libs: [
124 "libprotobuf-java-lite",
125 "launcher_log_protos_lite"
126 ],
127}
128
Hyunyoung Song8605be32020-02-21 14:52:25 -0800129java_library {
130 name: "LauncherPluginLib",
131
132 static_libs: ["PluginCoreLib"],
133
134 srcs: ["src_plugins/**/*.java"],
135
136 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700137 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -0800138}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800139
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800140// Library with all the dependencies for building Launcher3
141android_library {
142 name: "Launcher3ResLib",
143 srcs: [ ],
144 resource_dirs: ["res"],
145 static_libs: [
146 "LauncherPluginLib",
147 "launcher_quickstep_log_protos_lite",
148 "androidx-constraintlayout_constraintlayout",
149 "androidx.recyclerview_recyclerview",
150 "androidx.dynamicanimation_dynamicanimation",
151 "androidx.fragment_fragment",
152 "androidx.preference_preference",
153 "androidx.slice_slice-view",
154 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400155 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800156 "iconloader_base",
Johannes Gallmann6518efc2022-10-04 11:57:37 +0000157 "view_capture"
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//
170android_library {
171 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800172 srcs: ["src_build_config/**/*.java"],
173 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800174 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700175 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800176 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000177 lint: {
178 baseline_filename: "lint-baseline-common-deps-lib.xml",
179 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800180}
181
182//
183// Build rule for Launcher3 app.
184//
185android_app {
186 name: "Launcher3",
187
188 static_libs: [
189 "Launcher3CommonDepsLib",
190 ],
191 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000192 ":launcher-src",
193 ":launcher-src_shortcuts_overrides",
194 ":launcher-src_ui_overrides",
195 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800196 ],
197 resource_dirs: [
198 "ext_tests/res",
199 ],
200 optimize: {
201 proguard_flags_files: ["proguard.flags"],
202 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
203 enabled: false,
204 },
205
206 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700207 min_sdk_version: min_launcher3_sdk_version,
208 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800209 privileged: true,
210 system_ext_specific: true,
211
212 overrides: [
213 "Home",
214 "Launcher2",
215 ],
216 required: ["privapp_whitelist_com.android.launcher3"],
217
218 jacoco: {
219 include_filter: ["com.android.launcher3.**"],
220 },
221 additional_manifests: [
222 "AndroidManifest-common.xml",
223 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000224 lint: {
225 baseline_filename: "lint-baseline-launcher3.xml",
226 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800227}
228
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800229// Library with all the dependencies for building quickstep
230android_library {
231 name: "QuickstepResLib",
232 srcs: [ ],
233 resource_dirs: [
234 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800235 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700236 libs: [
237 "framework-statsd",
238 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800239 static_libs: [
240 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800241 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800242 "SystemUISharedLib",
243 "SystemUI-statsd",
Jon Miranda27f95592022-04-06 17:29:09 +0000244 "SystemUIAnimationLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800245 ],
246 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700247 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800248}
249
250
Jon Spivacka65d68b2021-04-07 10:22:25 -0700251// Library with all the dependencies for building Launcher Go
252android_library {
253 name: "LauncherGoResLib",
254 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000255 ":launcher-src",
256 ":launcher-quickstep-src",
257 ":launcher-go-src",
258 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700259 ],
260 resource_dirs: [
261 "go/res",
262 "go/quickstep/res",
263 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000264 // Note the ordering here is important when it comes to resource
265 // overriding. We want the most specific resource overrides defined
266 // in QuickstepResLib to take precendece, so it should be the final
267 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700268 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000269 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700270 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700271 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700272 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700273 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700274 manifest: "quickstep/AndroidManifest-launcher.xml",
275 additional_manifests: [
276 "go/AndroidManifest.xml",
277 "AndroidManifest-common.xml",
278 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700279 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000280 lint: {
281 baseline_filename: "lint-baseline-go-res-lib.xml",
282 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700283}
284
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700285// Build rule for Quickstep library
286android_library {
287 name: "Launcher3QuickStepLib",
288 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000289 ":launcher-src",
290 ":launcher-quickstep-src",
291 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700292 ],
Thales Limac335ad22021-11-08 15:31:49 +0000293 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700294 libs: [
295 "framework-statsd",
296 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000297 // Note the ordering here is important when it comes to resource
298 // overriding. We want the most specific resource overrides defined
299 // in QuickstepResLib to take precendece, so it should be the final
300 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700301 static_libs: [
302 "SystemUI-statsd",
303 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000304 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000305 "QuickstepResLib",
Jon Miranda27f95592022-04-06 17:29:09 +0000306 "SystemUIAnimationLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700307 ],
308 manifest: "quickstep/AndroidManifest.xml",
309 platform_apis: true,
310 min_sdk_version: "current",
311 lint: {
312 baseline_filename: "lint-baseline-launcher3.xml",
313 },
314}
Thales Lima813834a2022-05-18 15:29:59 +0000315
316// Build rule for Launcher3 Go app for Android Go devices.
317android_app {
318 name: "Launcher3Go",
319
320 static_libs: ["Launcher3CommonDepsLib"],
321
322 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000323 ":launcher-src",
324 ":launcher-go-src",
325 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000326 ],
327
328 resource_dirs: ["go/res"],
329
330 optimize: {
331 proguard_flags_files: ["proguard.flags"],
332 },
333
334 sdk_version: "current",
335 min_sdk_version: "current",
336 target_sdk_version: "current",
337 privileged: true,
338 system_ext_specific: true,
339 overrides: [
340 "Home",
341 "Launcher2",
342 "Launcher3",
343 "Launcher3QuickStep",
344 ],
345 required: ["privapp_whitelist_com.android.launcher3"],
346
347 additional_manifests: [
348 "AndroidManifest.xml",
349 "AndroidManifest-common.xml",
350 ],
351
352 manifest: "go/AndroidManifest.xml",
353 jacoco: {
354 include_filter: ["com.android.launcher3.*"],
355 }
356
357}
358
359// Build rule for Quickstep app.
360android_app {
361 name: "Launcher3QuickStep",
362
363 static_libs: ["Launcher3QuickStepLib"],
364 optimize: {
365 enabled: false,
366 },
367
368 platform_apis: true,
369 min_sdk_version: "current",
370 target_sdk_version: "current",
371
372 privileged: true,
373 system_ext_specific: true,
374 overrides: [
375 "Home",
376 "Launcher2",
377 "Launcher3",
378 ],
379 required: ["privapp_whitelist_com.android.launcher3"],
380
381 resource_dirs: ["quickstep/res"],
382
383 additional_manifests: [
384 "quickstep/AndroidManifest-launcher.xml",
385 "AndroidManifest-common.xml",
386 ],
387
388 manifest: "quickstep/AndroidManifest.xml",
389 jacoco: {
390 include_filter: ["com.android.launcher3.*"],
391 }
392
393}
394
395// Build rule for Launcher3 Go app with quickstep for Android Go devices.
396android_app {
397 name: "Launcher3QuickStepGo",
398
399 static_libs: [
400 "SystemUI-statsd",
401 "SystemUISharedLib",
402 "LauncherGoResLib",
403 ],
404
405 platform_apis: true,
406 min_sdk_version: "current",
407 target_sdk_version: "current",
408
Thales Lima2c54bbf2022-07-12 15:45:10 +0000409 srcs: [ ],
Thales Lima813834a2022-05-18 15:29:59 +0000410
411 resource_dirs: [
412 "go/quickstep/res",
413 "go/res",
414 "quickstep/res",
415 ],
416
417 optimize: {
418 proguard_flags_files: ["proguard.flags"],
419 enabled: true,
420 },
421
422 privileged: true,
423 system_ext_specific: true,
424 overrides: [
425 "Home",
426 "Launcher2",
427 "Launcher3",
428 "Launcher3QuickStep",
429 ],
430 required: ["privapp_whitelist_com.android.launcher3"],
431
432 additional_manifests: [
433 "go/AndroidManifest.xml",
434 "go/AndroidManifest-launcher.xml",
435 "AndroidManifest-common.xml",
436 ],
437
438 manifest: "quickstep/AndroidManifest.xml",
439 jacoco: {
440 include_filter: ["com.android.launcher3.*"],
441 }
442
443}
444