blob: 330c32ec89268b241d53a7b85b2c980a2db66fc7 [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
vadimt09df0832019-03-07 14:59:30 -080022android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070023 name: "launcher-aosp-tapl",
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -070024 libs: [
25 "framework-statsd",
26 ],
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070027 static_libs: [
28 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -070029 "androidx.test.runner",
30 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070031 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -070032 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070033 "SystemUISharedLib",
Jon Miranda27f95592022-04-06 17:29:09 +000034 "SystemUIAnimationLib",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070035 ],
36 srcs: [
37 "tests/tapl/**/*.java",
vadimtf6ef8792022-07-26 13:54:31 -070038 "src/com/android/launcher3/testing/shared/**/*.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070039 ],
Sunny Goyal572aca42021-03-24 15:21:39 -070040 resource_dirs: [ ],
vadimt09df0832019-03-07 14:59:30 -080041 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070042 platform_apis: true,
43}
thiruram5e1ecf62019-11-13 17:49:35 -080044
45java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080046 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080047 srcs: [
48 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080049 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080050 ],
51 sdk_version: "current",
52 proto: {
53 type: "lite",
54 local_include_dirs:[
55 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -080056 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -080057 ],
58 },
thiruramc1c2bfa2020-02-04 18:56:40 -080059 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -080060}
Hyunyoung Song8605be32020-02-21 14:52:25 -080061
thiruramcbeb13d2021-01-27 14:45:58 -080062java_library_static {
63 name: "launcher_quickstep_log_protos_lite",
64 srcs: [
65 "quickstep/protos_overrides/*.proto",
66 ],
67 sdk_version: "current",
68 proto: {
69 type: "lite",
70 local_include_dirs:[
71 "quickstep/protos_overrides",
72 ],
73 },
74 static_libs: [
75 "libprotobuf-java-lite",
76 "launcher_log_protos_lite"
77 ],
78}
79
Hyunyoung Song8605be32020-02-21 14:52:25 -080080java_library {
81 name: "LauncherPluginLib",
82
83 static_libs: ["PluginCoreLib"],
84
85 srcs: ["src_plugins/**/*.java"],
86
87 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -070088 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -080089}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -080090
Sunny Goyalf5c42ea2021-03-12 16:00:40 -080091// Library with all the dependencies for building Launcher3
92android_library {
93 name: "Launcher3ResLib",
94 srcs: [ ],
95 resource_dirs: ["res"],
96 static_libs: [
97 "LauncherPluginLib",
98 "launcher_quickstep_log_protos_lite",
99 "androidx-constraintlayout_constraintlayout",
100 "androidx.recyclerview_recyclerview",
101 "androidx.dynamicanimation_dynamicanimation",
102 "androidx.fragment_fragment",
103 "androidx.preference_preference",
104 "androidx.slice_slice-view",
105 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400106 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800107 "iconloader_base",
108 ],
109 manifest: "AndroidManifest-common.xml",
110 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700111 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000112 lint: {
113 baseline_filename: "lint-baseline-res-lib.xml",
114 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800115}
116
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800117//
118// Build rule for Launcher3 dependencies lib.
119//
120android_library {
121 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800122 srcs: ["src_build_config/**/*.java"],
123 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800124 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700125 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800126 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000127 lint: {
128 baseline_filename: "lint-baseline-common-deps-lib.xml",
129 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800130}
131
132//
133// Build rule for Launcher3 app.
134//
135android_app {
136 name: "Launcher3",
137
138 static_libs: [
139 "Launcher3CommonDepsLib",
140 ],
141 srcs: [
142 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100143 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800144 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100145 "src_shortcuts_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800146 "src_ui_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100147 "src_ui_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800148 "ext_tests/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100149 "ext_tests/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800150 ],
151 resource_dirs: [
152 "ext_tests/res",
153 ],
154 optimize: {
155 proguard_flags_files: ["proguard.flags"],
156 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
157 enabled: false,
158 },
159
160 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700161 min_sdk_version: min_launcher3_sdk_version,
162 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800163 privileged: true,
164 system_ext_specific: true,
165
166 overrides: [
167 "Home",
168 "Launcher2",
169 ],
170 required: ["privapp_whitelist_com.android.launcher3"],
171
172 jacoco: {
173 include_filter: ["com.android.launcher3.**"],
174 },
175 additional_manifests: [
176 "AndroidManifest-common.xml",
177 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000178 lint: {
179 baseline_filename: "lint-baseline-launcher3.xml",
180 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800181}
182
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800183// Library with all the dependencies for building quickstep
184android_library {
185 name: "QuickstepResLib",
186 srcs: [ ],
187 resource_dirs: [
188 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800189 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700190 libs: [
191 "framework-statsd",
192 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800193 static_libs: [
194 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800195 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800196 "SystemUISharedLib",
197 "SystemUI-statsd",
Jon Miranda27f95592022-04-06 17:29:09 +0000198 "SystemUIAnimationLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800199 ],
200 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700201 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800202}
203
204
205// Source code used for test helpers
206filegroup {
207 name: "launcher-src-ext-tests",
Thales Lima26f44912021-10-21 15:34:28 +0100208 srcs: [
209 "ext_tests/src/**/*.java",
210 "ext_tests/src/**/*.kt",
Schneider Victor-tuliasfb252e72022-02-10 11:10:21 -0800211 "quickstep/ext_tests/src/**/*.java",
212 "quickstep/ext_tests/src/**/*.kt",
Thales Lima26f44912021-10-21 15:34:28 +0100213 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800214}
215
216// Common source files used to build launcher
217filegroup {
218 name: "launcher-src-no-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800219 srcs: [
220 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100221 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800222 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100223 "src_shortcuts_overrides/**/*.kt",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800224 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100225 "quickstep/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800226 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800227}
228
Shikha Malhotrae957b602022-04-11 07:57:18 +0000229// Common source files used to build go launcher except go/src files
Shikha Malhotra78843322022-02-24 13:30:57 +0000230filegroup {
231 name: "launcher-go-src-no-build-config",
232 srcs: [
233 "src/**/*.java",
234 "src/**/*.kt",
235 "quickstep/src/**/*.java",
236 "quickstep/src/**/*.kt",
Shikha Malhotra78843322022-02-24 13:30:57 +0000237 "go/quickstep/src/**/*.java",
238 "go/quickstep/src/**/*.kt",
239 ],
240}
241
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800242// Proguard files for Launcher3
243filegroup {
244 name: "launcher-proguard-rules",
245 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800246}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700247
Jon Spivacka65d68b2021-04-07 10:22:25 -0700248// Library with all the dependencies for building Launcher Go
249android_library {
250 name: "LauncherGoResLib",
251 srcs: [
252 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100253 "src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700254 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100255 "quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700256 "go/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100257 "go/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700258 "go/quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100259 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700260 ],
261 resource_dirs: [
262 "go/res",
263 "go/quickstep/res",
264 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000265 // Note the ordering here is important when it comes to resource
266 // overriding. We want the most specific resource overrides defined
267 // in QuickstepResLib to take precendece, so it should be the final
268 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700269 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000270 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700271 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700272 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700273 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700274 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700275 manifest: "quickstep/AndroidManifest-launcher.xml",
276 additional_manifests: [
277 "go/AndroidManifest.xml",
278 "AndroidManifest-common.xml",
279 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700280 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000281 lint: {
282 baseline_filename: "lint-baseline-go-res-lib.xml",
283 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700284}
285
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700286// Build rule for Quickstep library
287android_library {
288 name: "Launcher3QuickStepLib",
289 srcs: [
290 ":launcher-src-no-build-config",
291 ],
Thales Limac335ad22021-11-08 15:31:49 +0000292 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700293 libs: [
294 "framework-statsd",
295 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000296 // Note the ordering here is important when it comes to resource
297 // overriding. We want the most specific resource overrides defined
298 // in QuickstepResLib to take precendece, so it should be the final
299 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700300 static_libs: [
301 "SystemUI-statsd",
302 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000303 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000304 "QuickstepResLib",
Jon Miranda27f95592022-04-06 17:29:09 +0000305 "SystemUIAnimationLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700306 ],
307 manifest: "quickstep/AndroidManifest.xml",
308 platform_apis: true,
309 min_sdk_version: "current",
310 lint: {
311 baseline_filename: "lint-baseline-launcher3.xml",
312 },
313}
Thales Lima813834a2022-05-18 15:29:59 +0000314
315// Build rule for Launcher3 Go app for Android Go devices.
316android_app {
317 name: "Launcher3Go",
318
319 static_libs: ["Launcher3CommonDepsLib"],
320
321 srcs: [
322 "src/**/*.java",
323 "src_ui_overrides/**/*.java",
324 "go/src/**/*.java",
325 ],
326
327 resource_dirs: ["go/res"],
328
329 optimize: {
330 proguard_flags_files: ["proguard.flags"],
331 },
332
333 sdk_version: "current",
334 min_sdk_version: "current",
335 target_sdk_version: "current",
336 privileged: true,
337 system_ext_specific: true,
338 overrides: [
339 "Home",
340 "Launcher2",
341 "Launcher3",
342 "Launcher3QuickStep",
343 ],
344 required: ["privapp_whitelist_com.android.launcher3"],
345
346 additional_manifests: [
347 "AndroidManifest.xml",
348 "AndroidManifest-common.xml",
349 ],
350
351 manifest: "go/AndroidManifest.xml",
352 jacoco: {
353 include_filter: ["com.android.launcher3.*"],
354 }
355
356}
357
358// Build rule for Quickstep app.
359android_app {
360 name: "Launcher3QuickStep",
361
362 static_libs: ["Launcher3QuickStepLib"],
363 optimize: {
364 enabled: false,
365 },
366
367 platform_apis: true,
368 min_sdk_version: "current",
369 target_sdk_version: "current",
370
371 privileged: true,
372 system_ext_specific: true,
373 overrides: [
374 "Home",
375 "Launcher2",
376 "Launcher3",
377 ],
378 required: ["privapp_whitelist_com.android.launcher3"],
379
380 resource_dirs: ["quickstep/res"],
381
382 additional_manifests: [
383 "quickstep/AndroidManifest-launcher.xml",
384 "AndroidManifest-common.xml",
385 ],
386
387 manifest: "quickstep/AndroidManifest.xml",
388 jacoco: {
389 include_filter: ["com.android.launcher3.*"],
390 }
391
392}
393
394// Build rule for Launcher3 Go app with quickstep for Android Go devices.
395android_app {
396 name: "Launcher3QuickStepGo",
397
398 static_libs: [
399 "SystemUI-statsd",
400 "SystemUISharedLib",
401 "LauncherGoResLib",
402 ],
403
404 platform_apis: true,
405 min_sdk_version: "current",
406 target_sdk_version: "current",
407
408 srcs: [
409 "src/**/*.java",
410 "quickstep/src/**/*.java",
411 "go/src/**/*.java",
412 "go/quickstep/src/**/*.java",
413 ],
414
415 resource_dirs: [
416 "go/quickstep/res",
417 "go/res",
418 "quickstep/res",
419 ],
420
421 optimize: {
422 proguard_flags_files: ["proguard.flags"],
423 enabled: true,
424 },
425
426 privileged: true,
427 system_ext_specific: true,
428 overrides: [
429 "Home",
430 "Launcher2",
431 "Launcher3",
432 "Launcher3QuickStep",
433 ],
434 required: ["privapp_whitelist_com.android.launcher3"],
435
436 additional_manifests: [
437 "go/AndroidManifest.xml",
438 "go/AndroidManifest-launcher.xml",
439 "AndroidManifest-common.xml",
440 ],
441
442 manifest: "quickstep/AndroidManifest.xml",
443 jacoco: {
444 include_filter: ["com.android.launcher3.*"],
445 }
446
447}
448