blob: 43d28c9ad215ebc75fe27038e15b509794a6f2fb [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 {
16 default_applicable_licenses: ["packages_apps_Launcher3_license"],
17}
18
Sunny Goyal1fb271f2021-05-20 10:43:23 -070019min_launcher3_sdk_version = "26"
20
Bob Badour4bdf3802021-02-12 17:08:17 -080021// Added automatically by a large-scale-change
22// See: http://go/android-license-faq
23license {
24 name: "packages_apps_Launcher3_license",
25 visibility: [":__subpackages__"],
26 license_kinds: [
27 "SPDX-license-identifier-Apache-2.0",
28 ],
29 license_text: [
30 "NOTICE",
31 ],
32}
33
vadimt09df0832019-03-07 14:59:30 -080034android_library {
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070035 name: "launcher-aosp-tapl",
36 static_libs: [
37 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -070038 "androidx.test.runner",
39 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070040 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -070041 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070042 "SystemUISharedLib",
43 ],
44 srcs: [
45 "tests/tapl/**/*.java",
vadimt1b383af2019-05-08 15:29:37 -070046 "src/com/android/launcher3/ResourceUtils.java",
Sunny Goyalab3963d2019-05-23 00:50:08 -070047 "src/com/android/launcher3/testing/TestProtocol.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070048 ],
Sunny Goyal572aca42021-03-24 15:21:39 -070049 resource_dirs: [ ],
vadimt09df0832019-03-07 14:59:30 -080050 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070051 platform_apis: true,
52}
thiruram5e1ecf62019-11-13 17:49:35 -080053
54java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080055 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080056 srcs: [
57 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080058 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080059 ],
60 sdk_version: "current",
61 proto: {
62 type: "lite",
63 local_include_dirs:[
64 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -080065 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -080066 ],
67 },
thiruramc1c2bfa2020-02-04 18:56:40 -080068 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -080069}
Hyunyoung Song8605be32020-02-21 14:52:25 -080070
thiruramcbeb13d2021-01-27 14:45:58 -080071java_library_static {
72 name: "launcher_quickstep_log_protos_lite",
73 srcs: [
74 "quickstep/protos_overrides/*.proto",
75 ],
76 sdk_version: "current",
77 proto: {
78 type: "lite",
79 local_include_dirs:[
80 "quickstep/protos_overrides",
81 ],
82 },
83 static_libs: [
84 "libprotobuf-java-lite",
85 "launcher_log_protos_lite"
86 ],
87}
88
Hyunyoung Song8605be32020-02-21 14:52:25 -080089java_library {
90 name: "LauncherPluginLib",
91
92 static_libs: ["PluginCoreLib"],
93
94 srcs: ["src_plugins/**/*.java"],
95
96 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -070097 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -080098}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -080099
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",
117 ],
118 manifest: "AndroidManifest-common.xml",
119 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700120 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000121 lint: {
122 baseline_filename: "lint-baseline-res-lib.xml",
123 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800124}
125
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800126//
127// Build rule for Launcher3 dependencies lib.
128//
129android_library {
130 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800131 srcs: ["src_build_config/**/*.java"],
132 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800133 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700134 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800135 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000136 lint: {
137 baseline_filename: "lint-baseline-common-deps-lib.xml",
138 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800139}
140
141//
142// Build rule for Launcher3 app.
143//
144android_app {
145 name: "Launcher3",
146
147 static_libs: [
148 "Launcher3CommonDepsLib",
149 ],
150 srcs: [
151 "src/**/*.java",
152 "src_shortcuts_overrides/**/*.java",
153 "src_ui_overrides/**/*.java",
154 "ext_tests/src/**/*.java",
155 ],
156 resource_dirs: [
157 "ext_tests/res",
158 ],
159 optimize: {
160 proguard_flags_files: ["proguard.flags"],
161 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
162 enabled: false,
163 },
164
165 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700166 min_sdk_version: min_launcher3_sdk_version,
167 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800168 privileged: true,
169 system_ext_specific: true,
170
171 overrides: [
172 "Home",
173 "Launcher2",
174 ],
175 required: ["privapp_whitelist_com.android.launcher3"],
176
177 jacoco: {
178 include_filter: ["com.android.launcher3.**"],
179 },
180 additional_manifests: [
181 "AndroidManifest-common.xml",
182 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000183 lint: {
184 baseline_filename: "lint-baseline-launcher3.xml",
185 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800186}
187
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800188// Library with all the dependencies for building quickstep
189android_library {
190 name: "QuickstepResLib",
191 srcs: [ ],
192 resource_dirs: [
193 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800194 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800195 static_libs: [
196 "Launcher3ResLib",
197 "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",
208 srcs: ["ext_tests/src/**/*.java"],
209}
210
211// Common source files used to build launcher
212filegroup {
213 name: "launcher-src-no-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800214 srcs: [
215 "src/**/*.java",
216 "src_shortcuts_overrides/**/*.java",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800217 "quickstep/src/**/*.java",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800218 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800219}
220
221// Proguard files for Launcher3
222filegroup {
223 name: "launcher-proguard-rules",
224 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800225}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700226
Jon Spivacka65d68b2021-04-07 10:22:25 -0700227// Library with all the dependencies for building Launcher Go
228android_library {
229 name: "LauncherGoResLib",
230 srcs: [
231 "src/**/*.java",
232 "quickstep/src/**/*.java",
233 "go/src/**/*.java",
234 "go/quickstep/src/**/*.java",
235 ],
236 resource_dirs: [
237 "go/res",
238 "go/quickstep/res",
239 ],
240 static_libs: [
241 "Launcher3CommonDepsLib",
242 "QuickstepResLib",
243 ],
244 manifest: "quickstep/AndroidManifest-launcher.xml",
245 additional_manifests: [
246 "go/AndroidManifest.xml",
247 "AndroidManifest-common.xml",
248 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700249 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000250 lint: {
251 baseline_filename: "lint-baseline-go-res-lib.xml",
252 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700253}
254
Sunny Goyal4af8cf92021-07-29 15:48:24 -0700255// Build rule for Quickstep library
256android_library {
257 name: "Launcher3QuickStepLib",
258 srcs: [
259 ":launcher-src-no-build-config",
260 ],
261 resource_dirs: [
262 "quickstep/res",
263 ],
264 static_libs: [
265 "SystemUI-statsd",
266 "SystemUISharedLib",
267 "Launcher3CommonDepsLib"
268 ],
269 manifest: "quickstep/AndroidManifest.xml",
270 platform_apis: true,
271 min_sdk_version: "current",
272 lint: {
273 baseline_filename: "lint-baseline-launcher3.xml",
274 },
275}