blob: 1b6ffe42b78d6c32e4b89be9b77d655daa0194dd [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",
115 "iconloader_base",
116 ],
117 manifest: "AndroidManifest-common.xml",
118 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700119 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000120 lint: {
121 baseline_filename: "lint-baseline-res-lib.xml",
122 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800123}
124
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800125//
126// Build rule for Launcher3 dependencies lib.
127//
128android_library {
129 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800130 srcs: ["src_build_config/**/*.java"],
131 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800132 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700133 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800134 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000135 lint: {
136 baseline_filename: "lint-baseline-common-deps-lib.xml",
137 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800138}
139
140//
141// Build rule for Launcher3 app.
142//
143android_app {
144 name: "Launcher3",
145
146 static_libs: [
147 "Launcher3CommonDepsLib",
148 ],
149 srcs: [
150 "src/**/*.java",
151 "src_shortcuts_overrides/**/*.java",
152 "src_ui_overrides/**/*.java",
153 "ext_tests/src/**/*.java",
154 ],
155 resource_dirs: [
156 "ext_tests/res",
157 ],
158 optimize: {
159 proguard_flags_files: ["proguard.flags"],
160 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
161 enabled: false,
162 },
163
164 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700165 min_sdk_version: min_launcher3_sdk_version,
166 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800167 privileged: true,
168 system_ext_specific: true,
169
170 overrides: [
171 "Home",
172 "Launcher2",
173 ],
174 required: ["privapp_whitelist_com.android.launcher3"],
175
176 jacoco: {
177 include_filter: ["com.android.launcher3.**"],
178 },
179 additional_manifests: [
180 "AndroidManifest-common.xml",
181 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000182 lint: {
183 baseline_filename: "lint-baseline-launcher3.xml",
184 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800185}
186
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800187// Library with all the dependencies for building quickstep
188android_library {
189 name: "QuickstepResLib",
190 srcs: [ ],
191 resource_dirs: [
192 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800193 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800194 static_libs: [
195 "Launcher3ResLib",
196 "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",
207 srcs: ["ext_tests/src/**/*.java"],
208}
209
210// Common source files used to build launcher
211filegroup {
212 name: "launcher-src-no-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800213 srcs: [
214 "src/**/*.java",
215 "src_shortcuts_overrides/**/*.java",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800216 "quickstep/src/**/*.java",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800217 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800218}
219
220// Proguard files for Launcher3
221filegroup {
222 name: "launcher-proguard-rules",
223 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800224}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700225
226
227// 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