blob: 7c78ba844eedcc9428316c111e12b32678dfa8a8 [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",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070039 ],
Sunny Goyal572aca42021-03-24 15:21:39 -070040 resource_dirs: [ ],
vadimt09df0832019-03-07 14:59:30 -080041 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070042 platform_apis: true,
43}
thiruram5e1ecf62019-11-13 17:49:35 -080044
45java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080046 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080047 srcs: [
48 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080049 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080050 ],
51 sdk_version: "current",
52 proto: {
53 type: "lite",
54 local_include_dirs:[
55 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -080056 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -080057 ],
58 },
thiruramc1c2bfa2020-02-04 18:56:40 -080059 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -080060}
Hyunyoung Song8605be32020-02-21 14:52:25 -080061
thiruramcbeb13d2021-01-27 14:45:58 -080062java_library_static {
63 name: "launcher_quickstep_log_protos_lite",
64 srcs: [
65 "quickstep/protos_overrides/*.proto",
66 ],
67 sdk_version: "current",
68 proto: {
69 type: "lite",
70 local_include_dirs:[
71 "quickstep/protos_overrides",
72 ],
73 },
74 static_libs: [
75 "libprotobuf-java-lite",
76 "launcher_log_protos_lite"
77 ],
78}
79
Hyunyoung Song8605be32020-02-21 14:52:25 -080080java_library {
81 name: "LauncherPluginLib",
82
83 static_libs: ["PluginCoreLib"],
84
85 srcs: ["src_plugins/**/*.java"],
86
87 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -070088 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -080089}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -080090
Sunny Goyalf5c42ea2021-03-12 16:00:40 -080091// Library with all the dependencies for building Launcher3
92android_library {
93 name: "Launcher3ResLib",
94 srcs: [ ],
95 resource_dirs: ["res"],
96 static_libs: [
97 "LauncherPluginLib",
98 "launcher_quickstep_log_protos_lite",
99 "androidx-constraintlayout_constraintlayout",
100 "androidx.recyclerview_recyclerview",
101 "androidx.dynamicanimation_dynamicanimation",
102 "androidx.fragment_fragment",
103 "androidx.preference_preference",
104 "androidx.slice_slice-view",
105 "androidx.cardview_cardview",
Brian Isganitis93031bc2021-06-09 16:34:45 -0400106 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800107 "iconloader_base",
108 ],
109 manifest: "AndroidManifest-common.xml",
110 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700111 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000112 lint: {
113 baseline_filename: "lint-baseline-res-lib.xml",
114 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800115}
116
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800117//
118// Build rule for Launcher3 dependencies lib.
119//
120android_library {
121 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800122 srcs: ["src_build_config/**/*.java"],
123 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800124 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700125 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800126 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000127 lint: {
128 baseline_filename: "lint-baseline-common-deps-lib.xml",
129 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800130}
131
132//
133// Build rule for Launcher3 app.
134//
135android_app {
136 name: "Launcher3",
137
138 static_libs: [
139 "Launcher3CommonDepsLib",
140 ],
141 srcs: [
142 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100143 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800144 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100145 "src_shortcuts_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800146 "src_ui_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100147 "src_ui_overrides/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800148 "ext_tests/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100149 "ext_tests/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800150 ],
151 resource_dirs: [
152 "ext_tests/res",
153 ],
154 optimize: {
155 proguard_flags_files: ["proguard.flags"],
156 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
157 enabled: false,
158 },
159
160 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700161 min_sdk_version: min_launcher3_sdk_version,
162 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800163 privileged: true,
164 system_ext_specific: true,
165
166 overrides: [
167 "Home",
168 "Launcher2",
169 ],
170 required: ["privapp_whitelist_com.android.launcher3"],
171
172 jacoco: {
173 include_filter: ["com.android.launcher3.**"],
174 },
175 additional_manifests: [
176 "AndroidManifest-common.xml",
177 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000178 lint: {
179 baseline_filename: "lint-baseline-launcher3.xml",
180 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800181}
182
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800183// Library with all the dependencies for building quickstep
184android_library {
185 name: "QuickstepResLib",
186 srcs: [ ],
187 resource_dirs: [
188 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800189 ],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700190 libs: [
191 "framework-statsd",
192 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800193 static_libs: [
194 "Launcher3ResLib",
Schneider Victor-tuliasd0865f82021-11-09 13:19:21 -0800195 "lottie",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800196 "SystemUISharedLib",
197 "SystemUI-statsd",
198 ],
199 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700200 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800201}
202
203
204// Source code used for test helpers
205filegroup {
206 name: "launcher-src-ext-tests",
Thales Lima26f44912021-10-21 15:34:28 +0100207 srcs: [
208 "ext_tests/src/**/*.java",
209 "ext_tests/src/**/*.kt",
210 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800211}
212
213// Common source files used to build launcher
214filegroup {
215 name: "launcher-src-no-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800216 srcs: [
217 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100218 "src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800219 "src_shortcuts_overrides/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100220 "src_shortcuts_overrides/**/*.kt",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800221 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100222 "quickstep/src/**/*.kt",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800223 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800224}
225
226// Proguard files for Launcher3
227filegroup {
228 name: "launcher-proguard-rules",
229 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800230}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700231
Jon Spivacka65d68b2021-04-07 10:22:25 -0700232// Library with all the dependencies for building Launcher Go
233android_library {
234 name: "LauncherGoResLib",
235 srcs: [
236 "src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100237 "src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700238 "quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100239 "quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700240 "go/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100241 "go/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700242 "go/quickstep/src/**/*.java",
Thales Lima26f44912021-10-21 15:34:28 +0100243 "go/quickstep/src/**/*.kt",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700244 ],
245 resource_dirs: [
246 "go/res",
247 "go/quickstep/res",
248 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000249 // Note the ordering here is important when it comes to resource
250 // overriding. We want the most specific resource overrides defined
251 // in QuickstepResLib to take precendece, so it should be the final
252 // dependency. See b/205278434 for how this can go wrong.
Jon Spivacka65d68b2021-04-07 10:22:25 -0700253 static_libs: [
Greg Kaiser6f220d92021-11-05 16:12:47 +0000254 "Launcher3CommonDepsLib",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700255 "QuickstepResLib",
Jon Spivack89c21c72021-08-13 13:18:24 -0700256 "androidx.room_room-runtime",
Jon Spivacka65d68b2021-04-07 10:22:25 -0700257 ],
Jon Spivack89c21c72021-08-13 13:18:24 -0700258 plugins: ["androidx.room_room-compiler-plugin"],
Jon Spivacka65d68b2021-04-07 10:22:25 -0700259 manifest: "quickstep/AndroidManifest-launcher.xml",
260 additional_manifests: [
261 "go/AndroidManifest.xml",
262 "AndroidManifest-common.xml",
263 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700264 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000265 lint: {
266 baseline_filename: "lint-baseline-go-res-lib.xml",
267 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700268}
269
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700270// Build rule for Quickstep library
271android_library {
272 name: "Launcher3QuickStepLib",
273 srcs: [
274 ":launcher-src-no-build-config",
275 ],
Thales Limac335ad22021-11-08 15:31:49 +0000276 resource_dirs: [],
Thiru Ramasamyd495e8c2021-08-26 10:37:17 -0700277 libs: [
278 "framework-statsd",
279 ],
Ben Murdochfabc8732021-12-02 18:22:17 +0000280 // Note the ordering here is important when it comes to resource
281 // overriding. We want the most specific resource overrides defined
282 // in QuickstepResLib to take precendece, so it should be the final
283 // dependency. See b/208647810 for how this can go wrong.
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700284 static_libs: [
285 "SystemUI-statsd",
286 "SystemUISharedLib",
Thales Limac335ad22021-11-08 15:31:49 +0000287 "Launcher3CommonDepsLib",
Ben Murdochfabc8732021-12-02 18:22:17 +0000288 "QuickstepResLib",
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700289 ],
290 manifest: "quickstep/AndroidManifest.xml",
291 platform_apis: true,
292 min_sdk_version: "current",
293 lint: {
294 baseline_filename: "lint-baseline-launcher3.xml",
295 },
296}