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 | |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 103 | // Library with all the dependencies for building Launcher3 |
| 104 | android_library { |
| 105 | name: "Launcher3ResLib", |
| 106 | srcs: [ ], |
| 107 | resource_dirs: ["res"], |
| 108 | static_libs: [ |
| 109 | "LauncherPluginLib", |
| 110 | "launcher_quickstep_log_protos_lite", |
| 111 | "androidx-constraintlayout_constraintlayout", |
| 112 | "androidx.recyclerview_recyclerview", |
| 113 | "androidx.dynamicanimation_dynamicanimation", |
| 114 | "androidx.fragment_fragment", |
| 115 | "androidx.preference_preference", |
| 116 | "androidx.slice_slice-view", |
| 117 | "androidx.cardview_cardview", |
Brian Isganitis | 93031bc | 2021-06-09 16:34:45 -0400 | [diff] [blame] | 118 | "com.google.android.material_material", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 119 | "iconloader_base", |
| 120 | ], |
| 121 | manifest: "AndroidManifest-common.xml", |
| 122 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 123 | min_sdk_version: min_launcher3_sdk_version, |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 124 | lint: { |
| 125 | baseline_filename: "lint-baseline-res-lib.xml", |
| 126 | }, |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 127 | } |
| 128 | |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 129 | // |
| 130 | // Build rule for Launcher3 dependencies lib. |
| 131 | // |
| 132 | android_library { |
| 133 | name: "Launcher3CommonDepsLib", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 134 | srcs: ["src_build_config/**/*.java"], |
| 135 | static_libs: ["Launcher3ResLib"], |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 136 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 137 | min_sdk_version: min_launcher3_sdk_version, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 138 | manifest: "AndroidManifest-common.xml", |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 139 | lint: { |
| 140 | baseline_filename: "lint-baseline-common-deps-lib.xml", |
| 141 | }, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | // |
| 145 | // Build rule for Launcher3 app. |
| 146 | // |
| 147 | android_app { |
| 148 | name: "Launcher3", |
| 149 | |
| 150 | static_libs: [ |
| 151 | "Launcher3CommonDepsLib", |
| 152 | ], |
| 153 | srcs: [ |
| 154 | "src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 155 | "src/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 156 | "src_shortcuts_overrides/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 157 | "src_shortcuts_overrides/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 158 | "src_ui_overrides/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 159 | "src_ui_overrides/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 160 | "ext_tests/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 161 | "ext_tests/src/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 162 | ], |
| 163 | resource_dirs: [ |
| 164 | "ext_tests/res", |
| 165 | ], |
| 166 | optimize: { |
| 167 | proguard_flags_files: ["proguard.flags"], |
| 168 | // Proguard is disable for testing. Derivarive prjects to keep proguard enabled |
| 169 | enabled: false, |
| 170 | }, |
| 171 | |
| 172 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 173 | min_sdk_version: min_launcher3_sdk_version, |
| 174 | target_sdk_version: "current", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 175 | privileged: true, |
| 176 | system_ext_specific: true, |
| 177 | |
| 178 | overrides: [ |
| 179 | "Home", |
| 180 | "Launcher2", |
| 181 | ], |
| 182 | required: ["privapp_whitelist_com.android.launcher3"], |
| 183 | |
| 184 | jacoco: { |
| 185 | include_filter: ["com.android.launcher3.**"], |
| 186 | }, |
| 187 | additional_manifests: [ |
| 188 | "AndroidManifest-common.xml", |
| 189 | ], |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 190 | lint: { |
| 191 | baseline_filename: "lint-baseline-launcher3.xml", |
| 192 | }, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 193 | } |
| 194 | |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 195 | // Library with all the dependencies for building quickstep |
| 196 | android_library { |
| 197 | name: "QuickstepResLib", |
| 198 | srcs: [ ], |
| 199 | resource_dirs: [ |
| 200 | "quickstep/res", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 201 | ], |
Thiru Ramasamy | d495e8c | 2021-08-26 10:37:17 -0700 | [diff] [blame] | 202 | libs: [ |
| 203 | "framework-statsd", |
| 204 | ], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 205 | static_libs: [ |
| 206 | "Launcher3ResLib", |
| 207 | "SystemUISharedLib", |
| 208 | "SystemUI-statsd", |
| 209 | ], |
| 210 | manifest: "quickstep/AndroidManifest.xml", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 211 | min_sdk_version: "current", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | |
| 215 | // Source code used for test helpers |
| 216 | filegroup { |
| 217 | name: "launcher-src-ext-tests", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 218 | srcs: [ |
| 219 | "ext_tests/src/**/*.java", |
| 220 | "ext_tests/src/**/*.kt", |
| 221 | ], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 222 | } |
| 223 | |
| 224 | // Common source files used to build launcher |
| 225 | filegroup { |
| 226 | name: "launcher-src-no-build-config", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 227 | srcs: [ |
| 228 | "src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 229 | "src/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 230 | "src_shortcuts_overrides/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 231 | "src_shortcuts_overrides/**/*.kt", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 232 | "quickstep/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 233 | "quickstep/src/**/*.kt", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 234 | ], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 235 | } |
| 236 | |
| 237 | // Proguard files for Launcher3 |
| 238 | filegroup { |
| 239 | name: "launcher-proguard-rules", |
| 240 | srcs: ["proguard.flags"], |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 241 | } |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 242 | |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 243 | // Library with all the dependencies for building Launcher Go |
| 244 | android_library { |
| 245 | name: "LauncherGoResLib", |
| 246 | srcs: [ |
| 247 | "src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 248 | "src/**/*.kt", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 249 | "quickstep/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 250 | "quickstep/src/**/*.kt", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 251 | "go/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 252 | "go/src/**/*.kt", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 253 | "go/quickstep/src/**/*.java", |
Thales Lima | 26f4491 | 2021-10-21 15:34:28 +0100 | [diff] [blame^] | 254 | "go/quickstep/src/**/*.kt", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 255 | ], |
| 256 | resource_dirs: [ |
| 257 | "go/res", |
| 258 | "go/quickstep/res", |
| 259 | ], |
| 260 | static_libs: [ |
| 261 | "Launcher3CommonDepsLib", |
| 262 | "QuickstepResLib", |
| 263 | ], |
| 264 | manifest: "quickstep/AndroidManifest-launcher.xml", |
| 265 | additional_manifests: [ |
| 266 | "go/AndroidManifest.xml", |
| 267 | "AndroidManifest-common.xml", |
| 268 | ], |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 269 | min_sdk_version: "current", |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 270 | lint: { |
| 271 | baseline_filename: "lint-baseline-go-res-lib.xml", |
| 272 | }, |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 273 | } |
| 274 | |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 275 | // Build rule for Quickstep library |
| 276 | android_library { |
| 277 | name: "Launcher3QuickStepLib", |
| 278 | srcs: [ |
| 279 | ":launcher-src-no-build-config", |
| 280 | ], |
| 281 | resource_dirs: [ |
| 282 | "quickstep/res", |
| 283 | ], |
Thiru Ramasamy | d495e8c | 2021-08-26 10:37:17 -0700 | [diff] [blame] | 284 | libs: [ |
| 285 | "framework-statsd", |
| 286 | ], |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 287 | static_libs: [ |
| 288 | "SystemUI-statsd", |
| 289 | "SystemUISharedLib", |
| 290 | "Launcher3CommonDepsLib" |
| 291 | ], |
| 292 | manifest: "quickstep/AndroidManifest.xml", |
| 293 | platform_apis: true, |
| 294 | min_sdk_version: "current", |
| 295 | lint: { |
| 296 | baseline_filename: "lint-baseline-launcher3.xml", |
| 297 | }, |
| 298 | } |