blob: f5a38b4e6fb20581325cb19fc0ebd7b70b58509b [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",
34 ],
35 srcs: [
36 "tests/tapl/**/*.java",
vadimt1b383af2019-05-08 15:29:37 -070037 "src/com/android/launcher3/ResourceUtils.java",
Sunny Goyalab3963d2019-05-23 00:50:08 -070038 "src/com/android/launcher3/testing/TestProtocol.java",
Benno Lin7738cac2021-09-03 20:18:34 +000039 "src/com/android/launcher3/testing/*Request.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070040 ],
Sunny Goyal572aca42021-03-24 15:21:39 -070041 resource_dirs: [ ],
vadimt09df0832019-03-07 14:59:30 -080042 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070043 platform_apis: true,
44}
thiruram5e1ecf62019-11-13 17:49:35 -080045
46java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080047 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080048 srcs: [
49 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080050 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080051 ],
52 sdk_version: "current",
53 proto: {
54 type: "lite",
55 local_include_dirs:[
56 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -080057 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -080058 ],
59 },
thiruramc1c2bfa2020-02-04 18:56:40 -080060 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -080061}
Hyunyoung Song8605be32020-02-21 14:52:25 -080062
thiruramcbeb13d2021-01-27 14:45:58 -080063java_library_static {
64 name: "launcher_quickstep_log_protos_lite",
65 srcs: [
66 "quickstep/protos_overrides/*.proto",
67 ],
68 sdk_version: "current",
69 proto: {
70 type: "lite",
71 local_include_dirs:[
72 "quickstep/protos_overrides",
73 ],
74 },
75 static_libs: [
76 "libprotobuf-java-lite",
77 "launcher_log_protos_lite"
78 ],
79}
80
Hyunyoung Song8605be32020-02-21 14:52:25 -080081java_library {
82 name: "LauncherPluginLib",
83
84 static_libs: ["PluginCoreLib"],
85
86 srcs: ["src_plugins/**/*.java"],
87
88 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -070089 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -080090}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -080091
Sunny Goyalf5c42ea2021-03-12 16:00:40 -080092// Library with all the dependencies for building Launcher3
93android_library {
94 name: "Launcher3ResLib",
95 srcs: [ ],
96 resource_dirs: ["res"],
97 static_libs: [
98 "LauncherPluginLib",
99 "launcher_quickstep_log_protos_lite",
100 "androidx-constraintlayout_constraintlayout",
101 "androidx.recyclerview_recyclerview",
102 "androidx.dynamicanimation_dynamicanimation",
103 "androidx.fragment_fragment",
104 "androidx.preference_preference",
105 "androidx.slice_slice-view",
106 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400107 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800108 "iconloader_base",
109 ],
110 manifest: "AndroidManifest-common.xml",
111 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700112 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000113 lint: {
114 baseline_filename: "lint-baseline-res-lib.xml",
115 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800116}
117
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800118//
119// Build rule for Launcher3 dependencies lib.
120//
121android_library {
122 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800123 srcs: ["src_build_config/**/*.java"],
124 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800125 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700126 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800127 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000128 lint: {
129 baseline_filename: "lint-baseline-common-deps-lib.xml",
130 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800131}
132
133//
134// Build rule for Launcher3 app.
135//
136android_app {
137 name: "Launcher3",
138
139 static_libs: [
140 "Launcher3CommonDepsLib",
141 ],
142 srcs: [
143 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100144 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800145 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100146 "src_shortcuts_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800147 "src_ui_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100148 "src_ui_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800149 "ext_tests/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100150 "ext_tests/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800151 ],
152 resource_dirs: [
153 "ext_tests/res",
154 ],
155 optimize: {
156 proguard_flags_files: ["proguard.flags"],
157 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
158 enabled: false,
159 },
160
161 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700162 min_sdk_version: min_launcher3_sdk_version,
163 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800164 privileged: true,
165 system_ext_specific: true,
166
167 overrides: [
168 "Home",
169 "Launcher2",
170 ],
171 required: ["privapp_whitelist_com.android.launcher3"],
172
173 jacoco: {
174 include_filter: ["com.android.launcher3.**"],
175 },
176 additional_manifests: [
177 "AndroidManifest-common.xml",
178 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000179 lint: {
180 baseline_filename: "lint-baseline-launcher3.xml",
181 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800182}
183
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800184// Library with all the dependencies for building quickstep
185android_library {
186 name: "QuickstepResLib",
187 srcs: [ ],
188 resource_dirs: [
189 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800190 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700191 libs: [
192 "framework-statsd",
193 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800194 static_libs: [
195 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800196 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800197 "SystemUISharedLib",
198 "SystemUI-statsd",
199 ],
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",
211 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800212}
213
214// Common source files used to build launcher
215filegroup {
216 name: "launcher-src-no-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800217 srcs: [
218 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100219 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800220 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100221 "src_shortcuts_overrides/**/*.kt",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800222 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100223 "quickstep/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800224 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800225}
226
227// Proguard files for Launcher3
228filegroup {
229 name: "launcher-proguard-rules",
230 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800231}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700232
Jon Spivacka65d68b2021-04-07 10:22:25 -0700233// Library with all the dependencies for building Launcher Go
234android_library {
235 name: "LauncherGoResLib",
236 srcs: [
237 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100238 "src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700239 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100240 "quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700241 "go/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100242 "go/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700243 "go/quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100244 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700245 ],
246 resource_dirs: [
247 "go/res",
248 "go/quickstep/res",
249 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000250 // Note the ordering here is important when it comes to resource
251 // overriding. We want the most specific resource overrides defined
252 // in QuickstepResLib to take precendece, so it should be the final
253 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700254 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000255 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700256 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700257 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700258 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700259 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700260 manifest: "quickstep/AndroidManifest-launcher.xml",
261 additional_manifests: [
262 "go/AndroidManifest.xml",
263 "AndroidManifest-common.xml",
264 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700265 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000266 lint: {
267 baseline_filename: "lint-baseline-go-res-lib.xml",
268 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700269}
270
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700271// Build rule for Quickstep library
272android_library {
273 name: "Launcher3QuickStepLib",
274 srcs: [
275 ":launcher-src-no-build-config",
276 ],
Thales Limac335ad22021-11-08 15:31:49 +0000277 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700278 libs: [
279 "framework-statsd",
280 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000281 // Note the ordering here is important when it comes to resource
282 // overriding. We want the most specific resource overrides defined
283 // in QuickstepResLib to take precendece, so it should be the final
284 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700285 static_libs: [
286 "SystemUI-statsd",
287 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000288 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000289 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700290 ],
291 manifest: "quickstep/AndroidManifest.xml",
292 platform_apis: true,
293 min_sdk_version: "current",
294 lint: {
295 baseline_filename: "lint-baseline-launcher3.xml",
296 },
297}