Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 1 | // 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 Badour | 4bdf380 | 2021-02-12 17:08:17 -0800 | [diff] [blame] | 15 | package { |
| 16 | default_applicable_licenses: ["packages_apps_Launcher3_license"], |
| 17 | } |
| 18 | |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 19 | min_launcher3_sdk_version = "26" |
| 20 | |
Bob Badour | 4bdf380 | 2021-02-12 17:08:17 -0800 | [diff] [blame] | 21 | // Added automatically by a large-scale-change |
| 22 | // See: http://go/android-license-faq |
| 23 | license { |
| 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 | |
vadimt | 09df083 | 2019-03-07 14:59:30 -0800 | [diff] [blame] | 34 | android_library { |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 35 | name: "launcher-aosp-tapl", |
Thiru Ramasamy | d495e8c | 2021-08-26 10:37:17 -0700 | [diff] [blame] | 36 | libs: [ |
| 37 | "framework-statsd", |
| 38 | ], |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 39 | static_libs: [ |
| 40 | "androidx.annotation_annotation", |
Brett Chabot | d7d692c | 2018-10-23 21:17:58 -0700 | [diff] [blame] | 41 | "androidx.test.runner", |
| 42 | "androidx.test.rules", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 43 | "androidx.test.uiautomator_uiautomator", |
Hyunyoung Song | bb71582 | 2020-08-04 10:45:53 -0700 | [diff] [blame] | 44 | "androidx.preference_preference", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 45 | "SystemUISharedLib", |
| 46 | ], |
| 47 | srcs: [ |
| 48 | "tests/tapl/**/*.java", |
vadimt | 1b383af | 2019-05-08 15:29:37 -0700 | [diff] [blame] | 49 | "src/com/android/launcher3/ResourceUtils.java", |
Sunny Goyal | ab3963d | 2019-05-23 00:50:08 -0700 | [diff] [blame] | 50 | "src/com/android/launcher3/testing/TestProtocol.java", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 51 | ], |
Sunny Goyal | 572aca4 | 2021-03-24 15:21:39 -0700 | [diff] [blame] | 52 | resource_dirs: [ ], |
vadimt | 09df083 | 2019-03-07 14:59:30 -0800 | [diff] [blame] | 53 | manifest: "tests/tapl/AndroidManifest.xml", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 54 | platform_apis: true, |
| 55 | } |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 56 | |
| 57 | java_library_static { |
thiruram | c1c2bfa | 2020-02-04 18:56:40 -0800 | [diff] [blame] | 58 | name: "launcher_log_protos_lite", |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 59 | srcs: [ |
| 60 | "protos/*.proto", |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 61 | "protos_overrides/*.proto", |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 62 | ], |
| 63 | sdk_version: "current", |
| 64 | proto: { |
| 65 | type: "lite", |
| 66 | local_include_dirs:[ |
| 67 | "protos", |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 68 | "protos_overrides", |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 69 | ], |
| 70 | }, |
thiruram | c1c2bfa | 2020-02-04 18:56:40 -0800 | [diff] [blame] | 71 | static_libs: ["libprotobuf-java-lite"], |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 72 | } |
Hyunyoung Song | 8605be3 | 2020-02-21 14:52:25 -0800 | [diff] [blame] | 73 | |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 74 | java_library_static { |
| 75 | name: "launcher_quickstep_log_protos_lite", |
| 76 | srcs: [ |
| 77 | "quickstep/protos_overrides/*.proto", |
| 78 | ], |
| 79 | sdk_version: "current", |
| 80 | proto: { |
| 81 | type: "lite", |
| 82 | local_include_dirs:[ |
| 83 | "quickstep/protos_overrides", |
| 84 | ], |
| 85 | }, |
| 86 | static_libs: [ |
| 87 | "libprotobuf-java-lite", |
| 88 | "launcher_log_protos_lite" |
| 89 | ], |
| 90 | } |
| 91 | |
Hyunyoung Song | 8605be3 | 2020-02-21 14:52:25 -0800 | [diff] [blame] | 92 | java_library { |
| 93 | name: "LauncherPluginLib", |
| 94 | |
| 95 | static_libs: ["PluginCoreLib"], |
| 96 | |
| 97 | srcs: ["src_plugins/**/*.java"], |
| 98 | |
| 99 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 100 | min_sdk_version: min_launcher3_sdk_version, |
Hyunyoung Song | 8605be3 | 2020-02-21 14:52:25 -0800 | [diff] [blame] | 101 | } |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 102 | |
Anay Wadhera | 151d24f | 2020-10-10 22:46:40 -0700 | [diff] [blame] | 103 | java_import { |
| 104 | name: "libGoogleFeed", |
| 105 | jars: [ |
| 106 | "libs/libGoogleFeed.jar", |
| 107 | ], |
| 108 | } |
| 109 | |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 110 | // Library with all the dependencies for building Launcher3 |
| 111 | android_library { |
| 112 | name: "Launcher3ResLib", |
| 113 | srcs: [ ], |
| 114 | resource_dirs: ["res"], |
| 115 | static_libs: [ |
| 116 | "LauncherPluginLib", |
| 117 | "launcher_quickstep_log_protos_lite", |
| 118 | "androidx-constraintlayout_constraintlayout", |
| 119 | "androidx.recyclerview_recyclerview", |
| 120 | "androidx.dynamicanimation_dynamicanimation", |
| 121 | "androidx.fragment_fragment", |
| 122 | "androidx.preference_preference", |
| 123 | "androidx.slice_slice-view", |
| 124 | "androidx.cardview_cardview", |
Brian Isganitis | 93031bc | 2021-06-09 16:34:45 -0400 | [diff] [blame] | 125 | "com.google.android.material_material", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 126 | "iconloader_base", |
Anay Wadhera | 151d24f | 2020-10-10 22:46:40 -0700 | [diff] [blame] | 127 | "libGoogleFeed", |
Danny Lin | 77c49d1 | 2021-10-06 20:17:10 -0700 | [diff] [blame] | 128 | "colorkt", |
| 129 | "themelib", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 130 | ], |
| 131 | manifest: "AndroidManifest-common.xml", |
| 132 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 133 | min_sdk_version: min_launcher3_sdk_version, |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 134 | lint: { |
| 135 | baseline_filename: "lint-baseline-res-lib.xml", |
| 136 | }, |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 137 | } |
| 138 | |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 139 | // |
| 140 | // Build rule for Launcher3 dependencies lib. |
| 141 | // |
| 142 | android_library { |
| 143 | name: "Launcher3CommonDepsLib", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 144 | srcs: ["src_build_config/**/*.java"], |
| 145 | static_libs: ["Launcher3ResLib"], |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 146 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 147 | min_sdk_version: min_launcher3_sdk_version, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 148 | manifest: "AndroidManifest-common.xml", |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 149 | lint: { |
| 150 | baseline_filename: "lint-baseline-common-deps-lib.xml", |
| 151 | }, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 152 | } |
| 153 | |
| 154 | // |
| 155 | // Build rule for Launcher3 app. |
| 156 | // |
| 157 | android_app { |
| 158 | name: "Launcher3", |
| 159 | |
| 160 | static_libs: [ |
| 161 | "Launcher3CommonDepsLib", |
| 162 | ], |
| 163 | srcs: [ |
| 164 | "src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 165 | "src/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 166 | "src_shortcuts_overrides/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 167 | "src_shortcuts_overrides/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 168 | "src_ui_overrides/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 169 | "src_ui_overrides/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 170 | "ext_tests/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 171 | "ext_tests/src/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 172 | ], |
| 173 | resource_dirs: [ |
| 174 | "ext_tests/res", |
| 175 | ], |
| 176 | optimize: { |
| 177 | proguard_flags_files: ["proguard.flags"], |
| 178 | // Proguard is disable for testing. Derivarive prjects to keep proguard enabled |
| 179 | enabled: false, |
| 180 | }, |
| 181 | |
| 182 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 183 | min_sdk_version: min_launcher3_sdk_version, |
| 184 | target_sdk_version: "current", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 185 | privileged: true, |
| 186 | system_ext_specific: true, |
| 187 | |
| 188 | overrides: [ |
| 189 | "Home", |
| 190 | "Launcher2", |
| 191 | ], |
| 192 | required: ["privapp_whitelist_com.android.launcher3"], |
| 193 | |
| 194 | jacoco: { |
| 195 | include_filter: ["com.android.launcher3.**"], |
| 196 | }, |
| 197 | additional_manifests: [ |
| 198 | "AndroidManifest-common.xml", |
| 199 | ], |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 200 | lint: { |
| 201 | baseline_filename: "lint-baseline-launcher3.xml", |
| 202 | }, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 203 | } |
| 204 | |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 205 | // Library with all the dependencies for building quickstep |
| 206 | android_library { |
| 207 | name: "QuickstepResLib", |
| 208 | srcs: [ ], |
| 209 | resource_dirs: [ |
| 210 | "quickstep/res", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 211 | ], |
Thiru Ramasamy | d495e8c | 2021-08-26 10:37:17 -0700 | [diff] [blame] | 212 | libs: [ |
| 213 | "framework-statsd", |
| 214 | ], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 215 | static_libs: [ |
| 216 | "Launcher3ResLib", |
Schneider Victor-tulias | d0865f8 | 2021-11-09 13:19:21 -0800 | [diff] [blame] | 217 | "lottie", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 218 | "SystemUISharedLib", |
| 219 | "SystemUI-statsd", |
| 220 | ], |
| 221 | manifest: "quickstep/AndroidManifest.xml", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 222 | min_sdk_version: "current", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | |
| 226 | // Source code used for test helpers |
| 227 | filegroup { |
| 228 | name: "launcher-src-ext-tests", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 229 | srcs: [ |
| 230 | "ext_tests/src/**/*.java", |
| 231 | "ext_tests/src/**/*.kt", |
| 232 | ], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 233 | } |
| 234 | |
| 235 | // Common source files used to build launcher |
| 236 | filegroup { |
| 237 | name: "launcher-src-no-build-config", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 238 | srcs: [ |
| 239 | "src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 240 | "src/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 241 | "src_shortcuts_overrides/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 242 | "src_shortcuts_overrides/**/*.kt", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 243 | "quickstep/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 244 | "quickstep/src/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 245 | ], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 246 | } |
| 247 | |
| 248 | // Proguard files for Launcher3 |
| 249 | filegroup { |
| 250 | name: "launcher-proguard-rules", |
| 251 | srcs: ["proguard.flags"], |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 252 | } |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 253 | |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 254 | // Library with all the dependencies for building Launcher Go |
| 255 | android_library { |
| 256 | name: "LauncherGoResLib", |
| 257 | srcs: [ |
| 258 | "src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 259 | "src/**/*.kt", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 260 | "quickstep/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 261 | "quickstep/src/**/*.kt", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 262 | "go/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 263 | "go/src/**/*.kt", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 264 | "go/quickstep/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame] | 265 | "go/quickstep/src/**/*.kt", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 266 | ], |
| 267 | resource_dirs: [ |
| 268 | "go/res", |
| 269 | "go/quickstep/res", |
| 270 | ], |
Ben Murdoch | fabc873 | 2021-12-02 18:22:17 +0000 | [diff] [blame] | 271 | // Note the ordering here is important when it comes to resource |
| 272 | // overriding. We want the most specific resource overrides defined |
| 273 | // in QuickstepResLib to take precendece, so it should be the final |
| 274 | // dependency. See b/205278434 for how this can go wrong. |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 275 | static_libs: [ |
Thales Lima | 10eb3cd | 2021-10-25 16:45:57 +0100 | [diff] [blame] | 276 | "Launcher3CommonDepsLib", |
Greg Kaiser | 24898d3 | 2021-11-05 16:18:33 +0000 | [diff] [blame] | 277 | "QuickstepResLib", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 278 | ], |
| 279 | manifest: "quickstep/AndroidManifest-launcher.xml", |
| 280 | additional_manifests: [ |
| 281 | "go/AndroidManifest.xml", |
| 282 | "AndroidManifest-common.xml", |
| 283 | ], |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 284 | min_sdk_version: "current", |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 285 | lint: { |
| 286 | baseline_filename: "lint-baseline-go-res-lib.xml", |
| 287 | }, |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 288 | } |
| 289 | |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 290 | // Build rule for Quickstep library |
| 291 | android_library { |
| 292 | name: "Launcher3QuickStepLib", |
| 293 | srcs: [ |
| 294 | ":launcher-src-no-build-config", |
| 295 | ], |
Thales Lima | c335ad2 | 2021-11-08 15:31:49 +0000 | [diff] [blame] | 296 | resource_dirs: [], |
Thiru Ramasamy | d495e8c | 2021-08-26 10:37:17 -0700 | [diff] [blame] | 297 | libs: [ |
| 298 | "framework-statsd", |
| 299 | ], |
Ben Murdoch | fabc873 | 2021-12-02 18:22:17 +0000 | [diff] [blame] | 300 | // Note the ordering here is important when it comes to resource |
| 301 | // overriding. We want the most specific resource overrides defined |
| 302 | // in QuickstepResLib to take precendece, so it should be the final |
| 303 | // dependency. See b/208647810 for how this can go wrong. |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 304 | static_libs: [ |
| 305 | "SystemUI-statsd", |
| 306 | "SystemUISharedLib", |
Thales Lima | c335ad2 | 2021-11-08 15:31:49 +0000 | [diff] [blame] | 307 | "Launcher3CommonDepsLib", |
Ben Murdoch | fabc873 | 2021-12-02 18:22:17 +0000 | [diff] [blame] | 308 | "QuickstepResLib", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 309 | ], |
| 310 | manifest: "quickstep/AndroidManifest.xml", |
| 311 | platform_apis: true, |
| 312 | min_sdk_version: "current", |
| 313 | lint: { |
| 314 | baseline_filename: "lint-baseline-launcher3.xml", |
| 315 | }, |
| 316 | } |