blob: c9c3be843294f84678c5f53bf83e4d48cf89f41b [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
Edward Crosse016d582018-07-31 15:17:57 +020093java_import {
94 name: "libGoogleFeed",
95 jars: [
96 "libs/libGoogleFeed.jar",
97 ],
98}
99
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800100// Library with all the dependencies for building Launcher3
101android_library {
102 name: "Launcher3ResLib",
103 srcs: [ ],
104 resource_dirs: ["res"],
105 static_libs: [
106 "LauncherPluginLib",
107 "launcher_quickstep_log_protos_lite",
108 "androidx-constraintlayout_constraintlayout",
109 "androidx.recyclerview_recyclerview",
110 "androidx.dynamicanimation_dynamicanimation",
111 "androidx.fragment_fragment",
112 "androidx.preference_preference",
113 "androidx.slice_slice-view",
114 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400115 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800116 "iconloader_base",
Edward Crosse016d582018-07-31 15:17:57 +0200117 "libGoogleFeed",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800118 ],
119 manifest: "AndroidManifest-common.xml",
120 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700121 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000122 lint: {
123 baseline_filename: "lint-baseline-res-lib.xml",
124 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800125}
126
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800127//
128// Build rule for Launcher3 dependencies lib.
129//
130android_library {
131 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800132 srcs: ["src_build_config/**/*.java"],
133 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800134 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700135 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800136 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000137 lint: {
138 baseline_filename: "lint-baseline-common-deps-lib.xml",
139 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800140}
141
142//
143// Build rule for Launcher3 app.
144//
145android_app {
Joey0fd94762018-10-02 17:09:53 +0200146 name: "Trebuchet",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800147
148 static_libs: [
149 "Launcher3CommonDepsLib",
150 ],
151 srcs: [
152 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100153 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800154 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100155 "src_shortcuts_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800156 "src_ui_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100157 "src_ui_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800158 "ext_tests/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100159 "ext_tests/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800160 ],
161 resource_dirs: [
162 "ext_tests/res",
163 ],
164 optimize: {
165 proguard_flags_files: ["proguard.flags"],
166 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
167 enabled: false,
168 },
169
170 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700171 min_sdk_version: min_launcher3_sdk_version,
172 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800173 privileged: true,
174 system_ext_specific: true,
175
176 overrides: [
177 "Home",
178 "Launcher2",
179 ],
180 required: ["privapp_whitelist_com.android.launcher3"],
181
182 jacoco: {
183 include_filter: ["com.android.launcher3.**"],
184 },
185 additional_manifests: [
186 "AndroidManifest-common.xml",
187 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000188 lint: {
189 baseline_filename: "lint-baseline-launcher3.xml",
190 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800191}
192
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800193// Library with all the dependencies for building quickstep
194android_library {
195 name: "QuickstepResLib",
196 srcs: [ ],
197 resource_dirs: [
198 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800199 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700200 libs: [
201 "framework-statsd",
202 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800203 static_libs: [
204 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800205 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800206 "SystemUISharedLib",
207 "SystemUI-statsd",
Jon Miranda27f95592022-04-06 17:29:09 +0000208 "SystemUIAnimationLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800209 ],
210 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700211 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800212}
213
214
215// Source code used for test helpers
216filegroup {
217 name: "launcher-src-ext-tests",
Thales Lima26f44912021-10-21 15:34:28 +0100218 srcs: [
219 "ext_tests/src/**/*.java",
220 "ext_tests/src/**/*.kt",
Schneider Victor-tuliasfb252e72022-02-10 11:10:21 -0800221 "quickstep/ext_tests/src/**/*.java",
222 "quickstep/ext_tests/src/**/*.kt",
Thales Lima26f44912021-10-21 15:34:28 +0100223 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800224}
225
226// Common source files used to build launcher
227filegroup {
228 name: "launcher-src-no-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800229 srcs: [
230 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100231 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800232 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100233 "src_shortcuts_overrides/**/*.kt",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800234 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100235 "quickstep/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800236 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800237}
238
Shikha Malhotrae957b602022-04-11 07:57:18 +0000239// Common source files used to build go launcher except go/src files
Shikha Malhotra78843322022-02-24 13:30:57 +0000240filegroup {
241 name: "launcher-go-src-no-build-config",
242 srcs: [
243 "src/**/*.java",
244 "src/**/*.kt",
245 "quickstep/src/**/*.java",
246 "quickstep/src/**/*.kt",
Shikha Malhotra78843322022-02-24 13:30:57 +0000247 "go/quickstep/src/**/*.java",
248 "go/quickstep/src/**/*.kt",
249 ],
250}
251
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800252// Proguard files for Launcher3
253filegroup {
254 name: "launcher-proguard-rules",
255 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800256}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700257
Jon Spivacka65d68b2021-04-07 10:22:25 -0700258// Library with all the dependencies for building Launcher Go
259android_library {
260 name: "LauncherGoResLib",
261 srcs: [
262 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100263 "src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700264 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100265 "quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700266 "go/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100267 "go/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700268 "go/quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100269 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700270 ],
271 resource_dirs: [
272 "go/res",
273 "go/quickstep/res",
274 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000275 // Note the ordering here is important when it comes to resource
276 // overriding. We want the most specific resource overrides defined
277 // in QuickstepResLib to take precendece, so it should be the final
278 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700279 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000280 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700281 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700282 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700283 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700284 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700285 manifest: "quickstep/AndroidManifest-launcher.xml",
286 additional_manifests: [
287 "go/AndroidManifest.xml",
288 "AndroidManifest-common.xml",
289 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700290 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000291 lint: {
292 baseline_filename: "lint-baseline-go-res-lib.xml",
293 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700294}
295
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700296// Build rule for Quickstep library
297android_library {
298 name: "Launcher3QuickStepLib",
299 srcs: [
300 ":launcher-src-no-build-config",
301 ],
Thales Limac335ad22021-11-08 15:31:49 +0000302 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700303 libs: [
304 "framework-statsd",
305 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000306 // Note the ordering here is important when it comes to resource
307 // overriding. We want the most specific resource overrides defined
308 // in QuickstepResLib to take precendece, so it should be the final
309 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700310 static_libs: [
311 "SystemUI-statsd",
312 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000313 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000314 "QuickstepResLib",
Jon Miranda27f95592022-04-06 17:29:09 +0000315 "SystemUIAnimationLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700316 ],
317 manifest: "quickstep/AndroidManifest.xml",
318 platform_apis: true,
319 min_sdk_version: "current",
320 lint: {
321 baseline_filename: "lint-baseline-launcher3.xml",
322 },
323}