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