blob: a523a62bcb97c324f32487e2be8733ac560cec81 [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",
vadimt1b383af2019-05-08 15:29:37 -070038 "src/com/android/launcher3/ResourceUtils.java",
Sunny Goyalab3963d2019-05-23 00:50:08 -070039 "src/com/android/launcher3/testing/TestProtocol.java",
Benno Lin7738cac2021-09-03 20:18:34 +000040 "src/com/android/launcher3/testing/*Request.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070041 ],
Sunny Goyal572aca42021-03-24 15:21:39 -070042 resource_dirs: [ ],
vadimt09df0832019-03-07 14:59:30 -080043 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070044 platform_apis: true,
45}
thiruram5e1ecf62019-11-13 17:49:35 -080046
47java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080048 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080049 srcs: [
50 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080051 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080052 ],
53 sdk_version: "current",
54 proto: {
55 type: "lite",
56 local_include_dirs:[
57 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -080058 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -080059 ],
60 },
thiruramc1c2bfa2020-02-04 18:56:40 -080061 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -080062}
Hyunyoung Song8605be32020-02-21 14:52:25 -080063
thiruramcbeb13d2021-01-27 14:45:58 -080064java_library_static {
65 name: "launcher_quickstep_log_protos_lite",
66 srcs: [
67 "quickstep/protos_overrides/*.proto",
68 ],
69 sdk_version: "current",
70 proto: {
71 type: "lite",
72 local_include_dirs:[
73 "quickstep/protos_overrides",
74 ],
75 },
76 static_libs: [
77 "libprotobuf-java-lite",
78 "launcher_log_protos_lite"
79 ],
80}
81
Hyunyoung Song8605be32020-02-21 14:52:25 -080082java_library {
83 name: "LauncherPluginLib",
84
85 static_libs: ["PluginCoreLib"],
86
87 srcs: ["src_plugins/**/*.java"],
88
89 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -070090 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -080091}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -080092
Sunny Goyalf5c42ea2021-03-12 16:00:40 -080093// Library with all the dependencies for building Launcher3
94android_library {
95 name: "Launcher3ResLib",
96 srcs: [ ],
97 resource_dirs: ["res"],
98 static_libs: [
99 "LauncherPluginLib",
100 "launcher_quickstep_log_protos_lite",
101 "androidx-constraintlayout_constraintlayout",
102 "androidx.recyclerview_recyclerview",
103 "androidx.dynamicanimation_dynamicanimation",
104 "androidx.fragment_fragment",
105 "androidx.preference_preference",
106 "androidx.slice_slice-view",
107 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400108 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800109 "iconloader_base",
kholoud mohamed9db30542022-04-14 12:25:49 +0100110 "modules-utils-build",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800111 ],
112 manifest: "AndroidManifest-common.xml",
113 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700114 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000115 lint: {
116 baseline_filename: "lint-baseline-res-lib.xml",
117 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800118}
119
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800120//
121// Build rule for Launcher3 dependencies lib.
122//
123android_library {
124 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800125 srcs: ["src_build_config/**/*.java"],
126 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800127 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700128 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800129 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000130 lint: {
131 baseline_filename: "lint-baseline-common-deps-lib.xml",
132 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800133}
134
135//
136// Build rule for Launcher3 app.
137//
138android_app {
139 name: "Launcher3",
140
141 static_libs: [
142 "Launcher3CommonDepsLib",
143 ],
144 srcs: [
145 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100146 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800147 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100148 "src_shortcuts_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800149 "src_ui_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100150 "src_ui_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800151 "ext_tests/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100152 "ext_tests/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800153 ],
154 resource_dirs: [
155 "ext_tests/res",
156 ],
157 optimize: {
158 proguard_flags_files: ["proguard.flags"],
159 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
160 enabled: false,
161 },
162
163 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700164 min_sdk_version: min_launcher3_sdk_version,
165 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800166 privileged: true,
167 system_ext_specific: true,
168
169 overrides: [
170 "Home",
171 "Launcher2",
172 ],
173 required: ["privapp_whitelist_com.android.launcher3"],
174
175 jacoco: {
176 include_filter: ["com.android.launcher3.**"],
177 },
178 additional_manifests: [
179 "AndroidManifest-common.xml",
180 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000181 lint: {
182 baseline_filename: "lint-baseline-launcher3.xml",
183 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800184}
185
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800186// Library with all the dependencies for building quickstep
187android_library {
188 name: "QuickstepResLib",
189 srcs: [ ],
190 resource_dirs: [
191 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800192 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700193 libs: [
194 "framework-statsd",
195 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800196 static_libs: [
197 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800198 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800199 "SystemUISharedLib",
200 "SystemUI-statsd",
Jon Miranda27f95592022-04-06 17:29:09 +0000201 "SystemUIAnimationLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800202 ],
203 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700204 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800205}
206
207
208// Source code used for test helpers
209filegroup {
210 name: "launcher-src-ext-tests",
Thales Lima26f44912021-10-21 15:34:28 +0100211 srcs: [
212 "ext_tests/src/**/*.java",
213 "ext_tests/src/**/*.kt",
Schneider Victor-tuliasfb252e72022-02-10 11:10:21 -0800214 "quickstep/ext_tests/src/**/*.java",
215 "quickstep/ext_tests/src/**/*.kt",
Thales Lima26f44912021-10-21 15:34:28 +0100216 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800217}
218
219// Common source files used to build launcher
220filegroup {
221 name: "launcher-src-no-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800222 srcs: [
223 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100224 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800225 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100226 "src_shortcuts_overrides/**/*.kt",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800227 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100228 "quickstep/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800229 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800230}
231
Shikha Malhotra78843322022-02-24 13:30:57 +0000232// Common source files used to build go launcher
233filegroup {
234 name: "launcher-go-src-no-build-config",
235 srcs: [
236 "src/**/*.java",
237 "src/**/*.kt",
238 "quickstep/src/**/*.java",
239 "quickstep/src/**/*.kt",
240 "go/src/**/*.java",
241 "go/src/**/*.kt",
242 "go/quickstep/src/**/*.java",
243 "go/quickstep/src/**/*.kt",
244 ],
245}
246
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800247// Proguard files for Launcher3
248filegroup {
249 name: "launcher-proguard-rules",
250 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800251}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700252
Jon Spivacka65d68b2021-04-07 10:22:25 -0700253// Library with all the dependencies for building Launcher Go
254android_library {
255 name: "LauncherGoResLib",
256 srcs: [
257 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100258 "src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700259 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100260 "quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700261 "go/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100262 "go/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700263 "go/quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100264 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700265 ],
266 resource_dirs: [
267 "go/res",
268 "go/quickstep/res",
269 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000270 // Note the ordering here is important when it comes to resource
271 // overriding. We want the most specific resource overrides defined
272 // in QuickstepResLib to take precendece, so it should be the final
273 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700274 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000275 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700276 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700277 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700278 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700279 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700280 manifest: "quickstep/AndroidManifest-launcher.xml",
281 additional_manifests: [
282 "go/AndroidManifest.xml",
283 "AndroidManifest-common.xml",
284 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700285 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000286 lint: {
287 baseline_filename: "lint-baseline-go-res-lib.xml",
288 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700289}
290
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700291// Build rule for Quickstep library
292android_library {
293 name: "Launcher3QuickStepLib",
294 srcs: [
295 ":launcher-src-no-build-config",
296 ],
Thales Limac335ad22021-11-08 15:31:49 +0000297 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700298 libs: [
299 "framework-statsd",
300 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000301 // Note the ordering here is important when it comes to resource
302 // overriding. We want the most specific resource overrides defined
303 // in QuickstepResLib to take precendece, so it should be the final
304 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700305 static_libs: [
306 "SystemUI-statsd",
307 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000308 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000309 "QuickstepResLib",
Jon Miranda27f95592022-04-06 17:29:09 +0000310 "SystemUIAnimationLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700311 ],
312 manifest: "quickstep/AndroidManifest.xml",
313 platform_apis: true,
314 min_sdk_version: "current",
315 lint: {
316 baseline_filename: "lint-baseline-launcher3.xml",
317 },
318}