blob: cd2ec2902dba0f0ba4aeb7eeebb2830e45b334b5 [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 Badour596ebbc2022-01-27 20:30:50 -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",
24 static_libs: [
25 "androidx.annotation_annotation",
Brett Chabotd7d692c2018-10-23 21:17:58 -070026 "androidx.test.runner",
27 "androidx.test.rules",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070028 "androidx.test.uiautomator_uiautomator",
Hyunyoung Songbb715822020-08-04 10:45:53 -070029 "androidx.preference_preference",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070030 "SystemUISharedLib",
31 ],
32 srcs: [
33 "tests/tapl/**/*.java",
vadimt1b383af2019-05-08 15:29:37 -070034 "src/com/android/launcher3/ResourceUtils.java",
Sunny Goyalab3963d2019-05-23 00:50:08 -070035 "src/com/android/launcher3/testing/TestProtocol.java",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070036 ],
Sunny Goyal572aca42021-03-24 15:21:39 -070037 resource_dirs: [ ],
vadimt09df0832019-03-07 14:59:30 -080038 manifest: "tests/tapl/AndroidManifest.xml",
Hyunyoung Songda4fcfe2018-09-05 09:57:59 -070039 platform_apis: true,
40}
thiruram5e1ecf62019-11-13 17:49:35 -080041
42java_library_static {
thiruramc1c2bfa2020-02-04 18:56:40 -080043 name: "launcher_log_protos_lite",
thiruram5e1ecf62019-11-13 17:49:35 -080044 srcs: [
45 "protos/*.proto",
thiruramcbeb13d2021-01-27 14:45:58 -080046 "protos_overrides/*.proto",
thiruram5e1ecf62019-11-13 17:49:35 -080047 ],
48 sdk_version: "current",
49 proto: {
50 type: "lite",
51 local_include_dirs:[
52 "protos",
thiruramcbeb13d2021-01-27 14:45:58 -080053 "protos_overrides",
thiruram5e1ecf62019-11-13 17:49:35 -080054 ],
55 },
thiruramc1c2bfa2020-02-04 18:56:40 -080056 static_libs: ["libprotobuf-java-lite"],
thiruram5e1ecf62019-11-13 17:49:35 -080057}
Hyunyoung Song8605be32020-02-21 14:52:25 -080058
thiruramcbeb13d2021-01-27 14:45:58 -080059java_library_static {
60 name: "launcher_quickstep_log_protos_lite",
61 srcs: [
62 "quickstep/protos_overrides/*.proto",
63 ],
64 sdk_version: "current",
65 proto: {
66 type: "lite",
67 local_include_dirs:[
68 "quickstep/protos_overrides",
69 ],
70 },
71 static_libs: [
72 "libprotobuf-java-lite",
73 "launcher_log_protos_lite"
74 ],
75}
76
Hyunyoung Song8605be32020-02-21 14:52:25 -080077java_library {
78 name: "LauncherPluginLib",
79
80 static_libs: ["PluginCoreLib"],
81
82 srcs: ["src_plugins/**/*.java"],
83
84 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -070085 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song8605be32020-02-21 14:52:25 -080086}
Hyunyoung Song5a007fe2021-02-25 00:58:05 -080087
Sunny Goyalf5c42ea2021-03-12 16:00:40 -080088// Library with all the dependencies for building Launcher3
89android_library {
90 name: "Launcher3ResLib",
91 srcs: [ ],
92 resource_dirs: ["res"],
93 static_libs: [
94 "LauncherPluginLib",
95 "launcher_quickstep_log_protos_lite",
96 "androidx-constraintlayout_constraintlayout",
97 "androidx.recyclerview_recyclerview",
98 "androidx.dynamicanimation_dynamicanimation",
99 "androidx.fragment_fragment",
100 "androidx.preference_preference",
101 "androidx.slice_slice-view",
102 "androidx.cardview_cardview",
Brian Isganitisec8a9942021-06-09 16:34:45 -0400103 "com.google.android.material_material",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800104 "iconloader_base",
105 ],
106 manifest: "AndroidManifest-common.xml",
107 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700108 min_sdk_version: min_launcher3_sdk_version,
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000109 lint: {
110 baseline_filename: "lint-baseline-res-lib.xml",
111 },
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800112}
113
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800114//
115// Build rule for Launcher3 dependencies lib.
116//
117android_library {
118 name: "Launcher3CommonDepsLib",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800119 srcs: ["src_build_config/**/*.java"],
120 static_libs: ["Launcher3ResLib"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800121 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700122 min_sdk_version: min_launcher3_sdk_version,
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800123 manifest: "AndroidManifest-common.xml",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000124 lint: {
125 baseline_filename: "lint-baseline-common-deps-lib.xml",
126 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800127}
128
129//
130// Build rule for Launcher3 app.
131//
132android_app {
133 name: "Launcher3",
134
135 static_libs: [
136 "Launcher3CommonDepsLib",
137 ],
138 srcs: [
139 "src/**/*.java",
140 "src_shortcuts_overrides/**/*.java",
141 "src_ui_overrides/**/*.java",
142 "ext_tests/src/**/*.java",
143 ],
144 resource_dirs: [
145 "ext_tests/res",
146 ],
147 optimize: {
148 proguard_flags_files: ["proguard.flags"],
149 // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
150 enabled: false,
151 },
152
153 sdk_version: "current",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700154 min_sdk_version: min_launcher3_sdk_version,
155 target_sdk_version: "current",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800156 privileged: true,
157 system_ext_specific: true,
158
159 overrides: [
160 "Home",
161 "Launcher2",
162 ],
163 required: ["privapp_whitelist_com.android.launcher3"],
164
165 jacoco: {
166 include_filter: ["com.android.launcher3.**"],
167 },
168 additional_manifests: [
169 "AndroidManifest-common.xml",
170 ],
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000171 lint: {
172 baseline_filename: "lint-baseline-launcher3.xml",
173 },
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800174}
175
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800176// Library with all the dependencies for building quickstep
177android_library {
178 name: "QuickstepResLib",
179 srcs: [ ],
180 resource_dirs: [
181 "quickstep/res",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800182 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800183 static_libs: [
184 "Launcher3ResLib",
185 "SystemUISharedLib",
186 "SystemUI-statsd",
187 ],
188 manifest: "quickstep/AndroidManifest.xml",
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700189 min_sdk_version: "current",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800190}
191
192
193// Source code used for test helpers
194filegroup {
195 name: "launcher-src-ext-tests",
196 srcs: ["ext_tests/src/**/*.java"],
197}
198
199// Common source files used to build launcher
200filegroup {
201 name: "launcher-src-no-build-config",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800202 srcs: [
203 "src/**/*.java",
204 "src_shortcuts_overrides/**/*.java",
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800205 "quickstep/src/**/*.java",
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800206 ],
Sunny Goyalf5c42ea2021-03-12 16:00:40 -0800207}
208
209// Proguard files for Launcher3
210filegroup {
211 name: "launcher-proguard-rules",
212 srcs: ["proguard.flags"],
Hyunyoung Song5a007fe2021-02-25 00:58:05 -0800213}
Jon Spivacka65d68b2021-04-07 10:22:25 -0700214
215
216// Library with all the dependencies for building Launcher Go
217android_library {
218 name: "LauncherGoResLib",
219 srcs: [
220 "src/**/*.java",
221 "quickstep/src/**/*.java",
222 "go/src/**/*.java",
223 "go/quickstep/src/**/*.java",
224 ],
225 resource_dirs: [
226 "go/res",
227 "go/quickstep/res",
228 ],
229 static_libs: [
230 "Launcher3CommonDepsLib",
231 "QuickstepResLib",
232 ],
233 manifest: "quickstep/AndroidManifest-launcher.xml",
234 additional_manifests: [
235 "go/AndroidManifest.xml",
236 "AndroidManifest-common.xml",
237 ],
Sunny Goyal1fb271f2021-05-20 10:43:23 -0700238 min_sdk_version: "current",
Pedro Loureiro1e296c12021-03-09 18:35:52 +0000239 lint: {
240 baseline_filename: "lint-baseline-go-res-lib.xml",
241 },
Jon Spivacka65d68b2021-04-07 10:22:25 -0700242}
243