blob: 0a55675d43e79a13a2ab708b476d37db7569dbae [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",
110 ],
111 manifest: "AndroidManifest-common.xml",
112 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700113 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000114 lint: {
115 baseline_filename: "lint-baseline-res-lib.xml",
116 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800117}
118
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800119//
120// Build rule for Launcher3 dependencies lib.
121//
122android_library {
123 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800124 srcs: ["src_build_config/**/*.java"],
125 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800126 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700127 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800128 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000129 lint: {
130 baseline_filename: "lint-baseline-common-deps-lib.xml",
131 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800132}
133
134//
135// Build rule for Launcher3 app.
136//
137android_app {
138 name: "Launcher3",
139
140 static_libs: [
141 "Launcher3CommonDepsLib",
142 ],
143 srcs: [
144 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100145 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800146 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100147 "src_shortcuts_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800148 "src_ui_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100149 "src_ui_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800150 "ext_tests/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100151 "ext_tests/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800152 ],
153 resource_dirs: [
154 "ext_tests/res",
155 ],
156 optimize: {
157 proguard_flags_files: ["proguard.flags"],
158 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
159 enabled: false,
160 },
161
162 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700163 min_sdk_version: min_launcher3_sdk_version,
164 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800165 privileged: true,
166 system_ext_specific: true,
167
168 overrides: [
169 "Home",
170 "Launcher2",
171 ],
172 required: ["privapp_whitelist_com.android.launcher3"],
173
174 jacoco: {
175 include_filter: ["com.android.launcher3.**"],
176 },
177 additional_manifests: [
178 "AndroidManifest-common.xml",
179 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000180 lint: {
181 baseline_filename: "lint-baseline-launcher3.xml",
182 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800183}
184
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800185// Library with all the dependencies for building quickstep
186android_library {
187 name: "QuickstepResLib",
188 srcs: [ ],
189 resource_dirs: [
190 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800191 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700192 libs: [
193 "framework-statsd",
194 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800195 static_libs: [
196 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800197 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800198 "SystemUISharedLib",
199 "SystemUI-statsd",
Jon Miranda27f95592022-04-06 17:29:09 +0000200 "SystemUIAnimationLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800201 ],
202 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700203 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800204}
205
206
207// Source code used for test helpers
208filegroup {
209 name: "launcher-src-ext-tests",
Thales Lima26f44912021-10-21 15:34:28 +0100210 srcs: [
211 "ext_tests/src/**/*.java",
212 "ext_tests/src/**/*.kt",
Schneider Victor-tuliasfb252e72022-02-10 11:10:21 -0800213 "quickstep/ext_tests/src/**/*.java",
214 "quickstep/ext_tests/src/**/*.kt",
Thales Lima26f44912021-10-21 15:34:28 +0100215 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800216}
217
218// Common source files used to build launcher
219filegroup {
220 name: "launcher-src-no-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800221 srcs: [
222 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100223 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800224 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100225 "src_shortcuts_overrides/**/*.kt",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800226 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100227 "quickstep/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800228 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800229}
230
Shikha Malhotrae957b602022-04-11 07:57:18 +0000231// Common source files used to build go launcher except go/src files
Shikha Malhotra78843322022-02-24 13:30:57 +0000232filegroup {
233 name: "launcher-go-src-no-build-config",
234 srcs: [
235 "src/**/*.java",
236 "src/**/*.kt",
237 "quickstep/src/**/*.java",
238 "quickstep/src/**/*.kt",
Shikha Malhotra78843322022-02-24 13:30:57 +0000239 "go/quickstep/src/**/*.java",
240 "go/quickstep/src/**/*.kt",
241 ],
242}
243
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800244// Proguard files for Launcher3
245filegroup {
246 name: "launcher-proguard-rules",
247 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800248}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700249
Jon Spivacka65d68b2021-04-07 10:22:25 -0700250// Library with all the dependencies for building Launcher Go
251android_library {
252 name: "LauncherGoResLib",
253 srcs: [
254 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100255 "src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700256 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100257 "quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700258 "go/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100259 "go/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700260 "go/quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100261 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700262 ],
263 resource_dirs: [
264 "go/res",
265 "go/quickstep/res",
266 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000267 // Note the ordering here is important when it comes to resource
268 // overriding. We want the most specific resource overrides defined
269 // in QuickstepResLib to take precendece, so it should be the final
270 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700271 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000272 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700273 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700274 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700275 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700276 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700277 manifest: "quickstep/AndroidManifest-launcher.xml",
278 additional_manifests: [
279 "go/AndroidManifest.xml",
280 "AndroidManifest-common.xml",
281 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700282 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000283 lint: {
284 baseline_filename: "lint-baseline-go-res-lib.xml",
285 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700286}
287
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700288// Build rule for Quickstep library
289android_library {
290 name: "Launcher3QuickStepLib",
291 srcs: [
292 ":launcher-src-no-build-config",
293 ],
Thales Limac335ad22021-11-08 15:31:49 +0000294 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700295 libs: [
296 "framework-statsd",
297 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000298 // Note the ordering here is important when it comes to resource
299 // overriding. We want the most specific resource overrides defined
300 // in QuickstepResLib to take precendece, so it should be the final
301 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700302 static_libs: [
303 "SystemUI-statsd",
304 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000305 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000306 "QuickstepResLib",
Jon Miranda27f95592022-04-06 17:29:09 +0000307 "SystemUIAnimationLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700308 ],
309 manifest: "quickstep/AndroidManifest.xml",
310 platform_apis: true,
311 min_sdk_version: "current",
312 lint: {
313 baseline_filename: "lint-baseline-launcher3.xml",
314 },
315}