blob: 6267e9fa27e2e2037e7ccc8037be10cb6a165c7b [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",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070083 ],
84 srcs: [
85 "tests/tapl/**/*.java",
vadimtf6ef8792022-07-26 13:54:31 -070086 "src/com/android/launcher3/testing/shared/**/*.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",
156 ],
157 manifest: "AndroidManifest-common.xml",
158 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700159 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000160 lint: {
161 baseline_filename: "lint-baseline-res-lib.xml",
162 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800163}
164
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800165//
166// Build rule for Launcher3 dependencies lib.
167//
168android_library {
169 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800170 srcs: ["src_build_config/**/*.java"],
171 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800172 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700173 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800174 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000175 lint: {
176 baseline_filename: "lint-baseline-common-deps-lib.xml",
177 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800178}
179
180//
181// Build rule for Launcher3 app.
182//
183android_app {
184 name: "Launcher3",
185
186 static_libs: [
187 "Launcher3CommonDepsLib",
188 ],
189 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000190 ":launcher-src",
191 ":launcher-src_shortcuts_overrides",
192 ":launcher-src_ui_overrides",
193 ":launcher-ext_tests",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800194 ],
195 resource_dirs: [
196 "ext_tests/res",
197 ],
198 optimize: {
199 proguard_flags_files: ["proguard.flags"],
200 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
201 enabled: false,
202 },
203
204 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700205 min_sdk_version: min_launcher3_sdk_version,
206 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800207 privileged: true,
208 system_ext_specific: true,
209
210 overrides: [
211 "Home",
212 "Launcher2",
213 ],
214 required: ["privapp_whitelist_com.android.launcher3"],
215
216 jacoco: {
217 include_filter: ["com.android.launcher3.**"],
218 },
219 additional_manifests: [
220 "AndroidManifest-common.xml",
221 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000222 lint: {
223 baseline_filename: "lint-baseline-launcher3.xml",
224 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800225}
226
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800227// Library with all the dependencies for building quickstep
228android_library {
229 name: "QuickstepResLib",
230 srcs: [ ],
231 resource_dirs: [
232 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800233 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700234 libs: [
235 "framework-statsd",
236 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800237 static_libs: [
238 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800239 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800240 "SystemUISharedLib",
241 "SystemUI-statsd",
Jon Miranda27f95592022-04-06 17:29:09 +0000242 "SystemUIAnimationLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800243 ],
244 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700245 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800246}
247
248
Jon Spivacka65d68b2021-04-07 10:22:25 -0700249// Library with all the dependencies for building Launcher Go
250android_library {
251 name: "LauncherGoResLib",
252 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000253 ":launcher-src",
254 ":launcher-quickstep-src",
255 ":launcher-go-src",
256 ":launcher-go-quickstep-src",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700257 ],
258 resource_dirs: [
259 "go/res",
260 "go/quickstep/res",
261 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000262 // Note the ordering here is important when it comes to resource
263 // overriding. We want the most specific resource overrides defined
264 // in QuickstepResLib to take precendece, so it should be the final
265 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700266 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000267 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700268 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700269 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700270 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700271 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700272 manifest: "quickstep/AndroidManifest-launcher.xml",
273 additional_manifests: [
274 "go/AndroidManifest.xml",
275 "AndroidManifest-common.xml",
276 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700277 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000278 lint: {
279 baseline_filename: "lint-baseline-go-res-lib.xml",
280 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700281}
282
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700283// Build rule for Quickstep library
284android_library {
285 name: "Launcher3QuickStepLib",
286 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000287 ":launcher-src",
288 ":launcher-quickstep-src",
289 ":launcher-src_shortcuts_overrides",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700290 ],
Thales Limac335ad22021-11-08 15:31:49 +0000291 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700292 libs: [
293 "framework-statsd",
294 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000295 // Note the ordering here is important when it comes to resource
296 // overriding. We want the most specific resource overrides defined
297 // in QuickstepResLib to take precendece, so it should be the final
298 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700299 static_libs: [
300 "SystemUI-statsd",
301 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000302 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000303 "QuickstepResLib",
Jon Miranda27f95592022-04-06 17:29:09 +0000304 "SystemUIAnimationLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700305 ],
306 manifest: "quickstep/AndroidManifest.xml",
307 platform_apis: true,
308 min_sdk_version: "current",
309 lint: {
310 baseline_filename: "lint-baseline-launcher3.xml",
311 },
312}
Thales Lima813834a2022-05-18 15:29:59 +0000313
314// Build rule for Launcher3 Go app for Android Go devices.
315android_app {
316 name: "Launcher3Go",
317
318 static_libs: ["Launcher3CommonDepsLib"],
319
320 srcs: [
Thales Lima2c54bbf2022-07-12 15:45:10 +0000321 ":launcher-src",
322 ":launcher-go-src",
323 ":launcher-src_ui_overrides",
Thales Lima813834a2022-05-18 15:29:59 +0000324 ],
325
326 resource_dirs: ["go/res"],
327
328 optimize: {
329 proguard_flags_files: ["proguard.flags"],
330 },
331
332 sdk_version: "current",
333 min_sdk_version: "current",
334 target_sdk_version: "current",
335 privileged: true,
336 system_ext_specific: true,
337 overrides: [
338 "Home",
339 "Launcher2",
340 "Launcher3",
341 "Launcher3QuickStep",
342 ],
343 required: ["privapp_whitelist_com.android.launcher3"],
344
345 additional_manifests: [
346 "AndroidManifest.xml",
347 "AndroidManifest-common.xml",
348 ],
349
350 manifest: "go/AndroidManifest.xml",
351 jacoco: {
352 include_filter: ["com.android.launcher3.*"],
353 }
354
355}
356
357// Build rule for Quickstep app.
358android_app {
359 name: "Launcher3QuickStep",
360
361 static_libs: ["Launcher3QuickStepLib"],
362 optimize: {
363 enabled: false,
364 },
365
366 platform_apis: true,
367 min_sdk_version: "current",
368 target_sdk_version: "current",
369
370 privileged: true,
371 system_ext_specific: true,
372 overrides: [
373 "Home",
374 "Launcher2",
375 "Launcher3",
376 ],
377 required: ["privapp_whitelist_com.android.launcher3"],
378
379 resource_dirs: ["quickstep/res"],
380
381 additional_manifests: [
382 "quickstep/AndroidManifest-launcher.xml",
383 "AndroidManifest-common.xml",
384 ],
385
386 manifest: "quickstep/AndroidManifest.xml",
387 jacoco: {
388 include_filter: ["com.android.launcher3.*"],
389 }
390
391}
392
393// Build rule for Launcher3 Go app with quickstep for Android Go devices.
394android_app {
395 name: "Launcher3QuickStepGo",
396
397 static_libs: [
398 "SystemUI-statsd",
399 "SystemUISharedLib",
400 "LauncherGoResLib",
401 ],
402
403 platform_apis: true,
404 min_sdk_version: "current",
405 target_sdk_version: "current",
406
Thales Lima2c54bbf2022-07-12 15:45:10 +0000407 srcs: [ ],
Thales Lima813834a2022-05-18 15:29:59 +0000408
409 resource_dirs: [
410 "go/quickstep/res",
411 "go/res",
412 "quickstep/res",
413 ],
414
415 optimize: {
416 proguard_flags_files: ["proguard.flags"],
417 enabled: true,
418 },
419
420 privileged: true,
421 system_ext_specific: true,
422 overrides: [
423 "Home",
424 "Launcher2",
425 "Launcher3",
426 "Launcher3QuickStep",
427 ],
428 required: ["privapp_whitelist_com.android.launcher3"],
429
430 additional_manifests: [
431 "go/AndroidManifest.xml",
432 "go/AndroidManifest-launcher.xml",
433 "AndroidManifest-common.xml",
434 ],
435
436 manifest: "quickstep/AndroidManifest.xml",
437 jacoco: {
438 include_filter: ["com.android.launcher3.*"],
439 }
440
441}
442