blob: 3aa93946fdfabda4d3d13adfd9138d3b15259607 [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",
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
229// Proguard files for Launcher3
230filegroup {
231 name: "launcher-proguard-rules",
232 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800233}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700234
Jon Spivacka65d68b2021-04-07 10:22:25 -0700235// Library with all the dependencies for building Launcher Go
236android_library {
237 name: "LauncherGoResLib",
238 srcs: [
239 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100240 "src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700241 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100242 "quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700243 "go/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100244 "go/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700245 "go/quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100246 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700247 ],
248 resource_dirs: [
249 "go/res",
250 "go/quickstep/res",
251 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000252 // Note the ordering here is important when it comes to resource
253 // overriding. We want the most specific resource overrides defined
254 // in QuickstepResLib to take precendece, so it should be the final
255 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700256 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000257 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700258 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700259 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700260 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700261 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700262 manifest: "quickstep/AndroidManifest-launcher.xml",
263 additional_manifests: [
264 "go/AndroidManifest.xml",
265 "AndroidManifest-common.xml",
266 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700267 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000268 lint: {
269 baseline_filename: "lint-baseline-go-res-lib.xml",
270 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700271}
272
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700273// Build rule for Quickstep library
274android_library {
275 name: "Launcher3QuickStepLib",
276 srcs: [
277 ":launcher-src-no-build-config",
278 ],
Thales Limac335ad22021-11-08 15:31:49 +0000279 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700280 libs: [
281 "framework-statsd",
282 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000283 // Note the ordering here is important when it comes to resource
284 // overriding. We want the most specific resource overrides defined
285 // in QuickstepResLib to take precendece, so it should be the final
286 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700287 static_libs: [
288 "SystemUI-statsd",
289 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000290 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000291 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700292 ],
293 manifest: "quickstep/AndroidManifest.xml",
294 platform_apis: true,
295 min_sdk_version: "current",
296 lint: {
297 baseline_filename: "lint-baseline-launcher3.xml",
298 },
299}