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 | 9d2ece1 | 2024-03-22 13:52:19 -0700 | [diff] [blame] | 20 | min_launcher3_sdk_version = "30" |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 21 | |
Jared Duke | 1222dd7 | 2024-07-12 00:01:11 +0000 | [diff] [blame] | 22 | // Targets that don't inherit framework aconfig libs (i.e., those that don't set |
| 23 | // `platform_apis: true`) must manually link them. |
| 24 | java_defaults { |
| 25 | name: "launcher-non-platform-apis-defaults", |
| 26 | static_libs: [ |
| 27 | "android.os.flags-aconfig-java", |
| 28 | "android.appwidget.flags-aconfig-java", |
| 29 | "com.android.window.flags.window-aconfig-java", |
| 30 | ] |
| 31 | } |
| 32 | |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 33 | // Common source files used to build launcher (java and kotlin) |
| 34 | // All sources are split so they can be reused in many other libraries/apps in other folders |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 35 | |
| 36 | // Main Launcher source, excluding the build config |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 37 | filegroup { |
| 38 | name: "launcher-src", |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 39 | srcs: [ |
| 40 | "src/**/*.java", |
| 41 | "src/**/*.kt", |
| 42 | ], |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 43 | } |
| 44 | |
Jordan Silva | 4afa195 | 2024-08-06 16:54:59 +0100 | [diff] [blame] | 45 | // Main Launcher source for compose, excluding the build config |
| 46 | filegroup { |
| 47 | name: "launcher-compose-enabled-src", |
| 48 | srcs: [ |
| 49 | "compose/facade/enabled/*.kt", |
| 50 | "compose/facade/core/*.kt", |
| 51 | "compose/features/**/*.kt", |
| 52 | ], |
| 53 | } |
| 54 | |
| 55 | filegroup { |
| 56 | name: "launcher-compose-disabled-src", |
| 57 | srcs: [ |
| 58 | "compose/facade/core/*.kt", |
| 59 | "compose/facade/disabled/*.kt", |
| 60 | ], |
| 61 | } |
| 62 | |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 63 | // Source code for quickstep build, on top of launcher-src |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 64 | filegroup { |
| 65 | name: "launcher-quickstep-src", |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 66 | srcs: [ |
| 67 | "quickstep/src/**/*.java", |
| 68 | "quickstep/src/**/*.kt", |
| 69 | ], |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 70 | } |
| 71 | |
Jordan Silva | 4afa195 | 2024-08-06 16:54:59 +0100 | [diff] [blame] | 72 | // Source code for quickstep build with compose enabled, on top of launcher-src |
| 73 | filegroup { |
| 74 | name: "launcher-quickstep-compose-enabled-src", |
| 75 | srcs: [ |
| 76 | "quickstep/compose/facade/core/*.kt", |
| 77 | "quickstep/compose/facade/enabled/*.kt", |
| 78 | "quickstep/compose/features/**/*.kt", |
| 79 | ], |
| 80 | } |
| 81 | |
| 82 | filegroup { |
| 83 | name: "launcher-quickstep-compose-disabled-src", |
| 84 | srcs: [ |
| 85 | "quickstep/compose/facade/core/*.kt", |
| 86 | "quickstep/compose/facade/disabled/*.kt", |
| 87 | ], |
| 88 | } |
| 89 | |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 90 | // Alternate source when quickstep is not included |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 91 | filegroup { |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 92 | name: "launcher-src_no_quickstep", |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 93 | srcs: [ |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 94 | "src_no_quickstep/**/*.java", |
| 95 | "src_no_quickstep/**/*.kt", |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 96 | ], |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 97 | } |
| 98 | |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 99 | // Default build config for Launcher3 |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 100 | filegroup { |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 101 | name: "launcher-build-config", |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 102 | srcs: [ |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 103 | "src_build_config/**/*.java", |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 104 | ], |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 105 | } |
| 106 | |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 107 | // Proguard files for Launcher3 |
| 108 | filegroup { |
| 109 | name: "launcher-proguard-rules", |
| 110 | srcs: ["proguard.flags"], |
| 111 | } |
| 112 | |
Jordan Silva | 4afa195 | 2024-08-06 16:54:59 +0100 | [diff] [blame] | 113 | // Opt-in configuration for Launcher3 code depending on Jetpack Compose. |
| 114 | soong_config_module_type { |
| 115 | name: "launcher_compose_java_defaults", |
| 116 | module_type: "java_defaults", |
| 117 | config_namespace: "ANDROID", |
| 118 | bool_variables: ["release_enable_compose_in_launcher"], |
| 119 | properties: [ |
| 120 | "srcs", |
| 121 | "static_libs", |
| 122 | ], |
| 123 | } |
| 124 | |
| 125 | // Opt-in configuration for Launcher Quickstep code depending on Jetpack Compose. |
| 126 | soong_config_bool_variable { |
| 127 | name: "release_enable_compose_in_launcher", |
| 128 | } |
| 129 | |
| 130 | soong_config_module_type { |
| 131 | name: "quickstep_compose_java_defaults", |
| 132 | module_type: "java_defaults", |
| 133 | config_namespace: "ANDROID", |
| 134 | bool_variables: ["release_enable_compose_in_launcher"], |
| 135 | properties: [ |
| 136 | "srcs", |
| 137 | "static_libs", |
| 138 | ], |
| 139 | } |
| 140 | |
| 141 | soong_config_module_type { |
| 142 | name: "launcher_compose_tests_java_defaults", |
| 143 | module_type: "java_defaults", |
| 144 | config_namespace: "ANDROID", |
| 145 | bool_variables: ["release_enable_compose_in_launcher"], |
| 146 | properties: [ |
| 147 | "static_libs", |
| 148 | ], |
| 149 | } |
| 150 | |
| 151 | launcher_compose_java_defaults { |
| 152 | name: "launcher_compose_defaults", |
| 153 | soong_config_variables: { |
| 154 | release_enable_compose_in_launcher: { |
| 155 | srcs: [ |
| 156 | ":launcher-compose-enabled-src" |
| 157 | ], |
| 158 | |
| 159 | // Compose dependencies |
| 160 | static_libs: [ |
| 161 | "androidx.compose.runtime_runtime", |
| 162 | "androidx.compose.material3_material3", |
| 163 | ], |
| 164 | |
| 165 | // By default, Compose is disabled and we compile the ComposeFacade |
| 166 | // in compose/launcher3/facade/disabled/. |
| 167 | conditions_default: { |
| 168 | srcs: [ |
| 169 | ":launcher-compose-disabled-src" |
| 170 | ], |
| 171 | static_libs: [], |
| 172 | }, |
| 173 | }, |
| 174 | }, |
| 175 | } |
| 176 | |
| 177 | quickstep_compose_java_defaults { |
| 178 | name: "quickstep_compose_defaults", |
| 179 | soong_config_variables: { |
| 180 | release_enable_compose_in_launcher: { |
| 181 | srcs: [ |
| 182 | ":launcher-quickstep-compose-enabled-src" |
| 183 | ], |
| 184 | |
| 185 | // Compose dependencies |
| 186 | static_libs: [ |
| 187 | "androidx.compose.runtime_runtime", |
| 188 | "androidx.compose.material3_material3", |
| 189 | ], |
| 190 | |
| 191 | // By default, Compose is disabled and we compile the ComposeFacade |
| 192 | // in compose/quickstep/facade/disabled/. |
| 193 | conditions_default: { |
| 194 | srcs: [ |
| 195 | ":launcher-quickstep-compose-disabled-src" |
| 196 | ], |
| 197 | static_libs: [], |
| 198 | }, |
| 199 | }, |
| 200 | }, |
| 201 | } |
| 202 | |
| 203 | launcher_compose_tests_java_defaults { |
| 204 | name: "launcher_compose_tests_defaults", |
| 205 | soong_config_variables: { |
| 206 | release_enable_compose_in_launcher: { |
| 207 | // Compose dependencies |
| 208 | static_libs: [ |
| 209 | "androidx.compose.runtime_runtime", |
| 210 | "androidx.compose.ui_ui-test-junit4", |
| 211 | "androidx.compose.ui_ui-test-manifest", |
| 212 | ], |
| 213 | |
| 214 | conditions_default: { |
| 215 | static_libs: [], |
| 216 | }, |
| 217 | }, |
| 218 | }, |
| 219 | } |
| 220 | |
vadimt | 09df083 | 2019-03-07 14:59:30 -0800 | [diff] [blame] | 221 | android_library { |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 222 | name: "launcher-aosp-tapl", |
Thiru Ramasamy | d495e8c | 2021-08-26 10:37:17 -0700 | [diff] [blame] | 223 | libs: [ |
| 224 | "framework-statsd", |
| 225 | ], |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 226 | static_libs: [ |
| 227 | "androidx.annotation_annotation", |
Brett Chabot | d7d692c | 2018-10-23 21:17:58 -0700 | [diff] [blame] | 228 | "androidx.test.runner", |
| 229 | "androidx.test.rules", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 230 | "androidx.test.uiautomator_uiautomator", |
Hyunyoung Song | bb71582 | 2020-08-04 10:45:53 -0700 | [diff] [blame] | 231 | "androidx.preference_preference", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 232 | "SystemUISharedLib", |
Peter Kalauskas | 9bdb1da | 2024-04-02 15:38:57 -0700 | [diff] [blame] | 233 | "//frameworks/libs/systemui:animationlib", |
Nicolo' Mazzucato | e8ee34a | 2023-01-24 15:41:10 +0000 | [diff] [blame] | 234 | "launcher-testing-shared", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 235 | ], |
| 236 | srcs: [ |
Uwais Ashraf | 9c2f5a4 | 2024-03-04 09:49:39 +0000 | [diff] [blame] | 237 | "tests/tapl/**/*.java", |
| 238 | "tests/tapl/**/*.kt", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 239 | ], |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 240 | resource_dirs: [], |
Uwais Ashraf | 9c2f5a4 | 2024-03-04 09:49:39 +0000 | [diff] [blame] | 241 | manifest: "tests/tapl/AndroidManifest.xml", |
Hyunyoung Song | da4fcfe | 2018-09-05 09:57:59 -0700 | [diff] [blame] | 242 | platform_apis: true, |
| 243 | } |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 244 | |
| 245 | java_library_static { |
thiruram | c1c2bfa | 2020-02-04 18:56:40 -0800 | [diff] [blame] | 246 | name: "launcher_log_protos_lite", |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 247 | srcs: [ |
| 248 | "protos/*.proto", |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 249 | "protos_overrides/*.proto", |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 250 | ], |
| 251 | sdk_version: "current", |
| 252 | proto: { |
| 253 | type: "lite", |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 254 | local_include_dirs: [ |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 255 | "protos", |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 256 | "protos_overrides", |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 257 | ], |
| 258 | }, |
thiruram | c1c2bfa | 2020-02-04 18:56:40 -0800 | [diff] [blame] | 259 | static_libs: ["libprotobuf-java-lite"], |
thiruram | 5e1ecf6 | 2019-11-13 17:49:35 -0800 | [diff] [blame] | 260 | } |
Hyunyoung Song | 8605be3 | 2020-02-21 14:52:25 -0800 | [diff] [blame] | 261 | |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 262 | java_library_static { |
| 263 | name: "launcher_quickstep_log_protos_lite", |
| 264 | srcs: [ |
| 265 | "quickstep/protos_overrides/*.proto", |
| 266 | ], |
| 267 | sdk_version: "current", |
| 268 | proto: { |
| 269 | type: "lite", |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 270 | local_include_dirs: [ |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 271 | "quickstep/protos_overrides", |
| 272 | ], |
| 273 | }, |
| 274 | static_libs: [ |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 275 | "libprotobuf-java-lite", |
| 276 | "launcher_log_protos_lite", |
| 277 | ], |
thiruram | cbeb13d | 2021-01-27 14:45:58 -0800 | [diff] [blame] | 278 | } |
| 279 | |
Hyunyoung Song | 8605be3 | 2020-02-21 14:52:25 -0800 | [diff] [blame] | 280 | java_library { |
| 281 | name: "LauncherPluginLib", |
| 282 | |
| 283 | static_libs: ["PluginCoreLib"], |
| 284 | |
| 285 | srcs: ["src_plugins/**/*.java"], |
| 286 | |
| 287 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 288 | min_sdk_version: min_launcher3_sdk_version, |
Hyunyoung Song | 8605be3 | 2020-02-21 14:52:25 -0800 | [diff] [blame] | 289 | } |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 290 | |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 291 | // Library with all the dependencies for building Launcher3 |
| 292 | android_library { |
| 293 | name: "Launcher3ResLib", |
Jordan Silva | 4afa195 | 2024-08-06 16:54:59 +0100 | [diff] [blame] | 294 | defaults: [ |
| 295 | "launcher_compose_defaults", |
| 296 | ], |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 297 | srcs: [], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 298 | resource_dirs: ["res"], |
| 299 | static_libs: [ |
| 300 | "LauncherPluginLib", |
| 301 | "launcher_quickstep_log_protos_lite", |
| 302 | "androidx-constraintlayout_constraintlayout", |
| 303 | "androidx.recyclerview_recyclerview", |
| 304 | "androidx.dynamicanimation_dynamicanimation", |
| 305 | "androidx.fragment_fragment", |
| 306 | "androidx.preference_preference", |
| 307 | "androidx.slice_slice-view", |
| 308 | "androidx.cardview_cardview", |
Sebastian Franco | 9ae4032 | 2023-10-10 10:50:28 -0700 | [diff] [blame] | 309 | "androidx.window_window", |
Brian Isganitis | 93031bc | 2021-06-09 16:34:45 -0400 | [diff] [blame] | 310 | "com.google.android.material_material", |
Peter Kalauskas | 9bdb1da | 2024-04-02 15:38:57 -0700 | [diff] [blame] | 311 | "//frameworks/libs/systemui:iconloader_base", |
| 312 | "//frameworks/libs/systemui:view_capture", |
| 313 | "//frameworks/libs/systemui:animationlib", |
Anna Zhuravleva | 9c20381 | 2023-11-20 18:30:35 +0000 | [diff] [blame] | 314 | "SystemUI-statsd", |
Nicolo' Mazzucato | e8ee34a | 2023-01-24 15:41:10 +0000 | [diff] [blame] | 315 | "launcher-testing-shared", |
Uwais Ashraf | 6e9927e | 2024-03-25 10:53:06 +0000 | [diff] [blame] | 316 | "androidx.lifecycle_lifecycle-common-java8", |
| 317 | "androidx.lifecycle_lifecycle-extensions", |
| 318 | "androidx.lifecycle_lifecycle-runtime-ktx", |
| 319 | "kotlinx_coroutines_android", |
| 320 | "kotlinx_coroutines", |
Anushree Ganjam | 2a14b97 | 2023-08-30 13:31:10 -0700 | [diff] [blame] | 321 | "com_android_launcher3_flags_lib", |
Jeremy Sim | 9e44e37 | 2023-10-10 14:54:39 -0700 | [diff] [blame] | 322 | "com_android_wm_shell_flags_lib", |
Jordan Silva | 4afa195 | 2024-08-06 16:54:59 +0100 | [diff] [blame] | 323 | |
Nicolo' Mazzucato | e8ee34a | 2023-01-24 15:41:10 +0000 | [diff] [blame] | 324 | ], |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 325 | manifest: "AndroidManifest-common.xml", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 326 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 327 | min_sdk_version: min_launcher3_sdk_version, |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 328 | lint: { |
Sunny Goyal | 9d2ece1 | 2024-03-22 13:52:19 -0700 | [diff] [blame] | 329 | baseline_filename: "lint-baseline.xml", |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 330 | }, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 331 | } |
| 332 | |
| 333 | // |
| 334 | // Build rule for Launcher3 app. |
| 335 | // |
| 336 | android_app { |
| 337 | name: "Launcher3", |
Jared Duke | 1222dd7 | 2024-07-12 00:01:11 +0000 | [diff] [blame] | 338 | defaults: ["launcher-non-platform-apis-defaults"], |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 339 | |
| 340 | static_libs: [ |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 341 | "Launcher3ResLib", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 342 | ], |
| 343 | srcs: [ |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 344 | ":launcher-src", |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 345 | ":launcher-src_no_quickstep", |
| 346 | ":launcher-build-config", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 347 | ], |
Sunny Goyal | 9d2ece1 | 2024-03-22 13:52:19 -0700 | [diff] [blame] | 348 | |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 349 | optimize: { |
Jordan Silva | 6a8d81a | 2024-07-08 13:29:48 +0000 | [diff] [blame] | 350 | proguard_flags_files: [":launcher-proguard-rules"], |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 351 | // Proguard is disable for testing. Derivarive prjects to keep proguard enabled |
| 352 | enabled: false, |
| 353 | }, |
| 354 | |
| 355 | sdk_version: "current", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 356 | min_sdk_version: min_launcher3_sdk_version, |
| 357 | target_sdk_version: "current", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 358 | privileged: true, |
| 359 | system_ext_specific: true, |
| 360 | |
| 361 | overrides: [ |
| 362 | "Home", |
| 363 | "Launcher2", |
| 364 | ], |
| 365 | required: ["privapp_whitelist_com.android.launcher3"], |
| 366 | |
| 367 | jacoco: { |
| 368 | include_filter: ["com.android.launcher3.**"], |
| 369 | }, |
| 370 | additional_manifests: [ |
| 371 | "AndroidManifest-common.xml", |
| 372 | ], |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 373 | lint: { |
Cole Faust | c778a67 | 2024-01-10 12:30:39 -0800 | [diff] [blame] | 374 | baseline_filename: "lint-baseline.xml", |
Pedro Loureiro | 1e296c1 | 2021-03-09 18:35:52 +0000 | [diff] [blame] | 375 | }, |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 376 | } |
| 377 | |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 378 | // Library with all the dependencies for building quickstep |
| 379 | android_library { |
| 380 | name: "QuickstepResLib", |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 381 | srcs: [], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 382 | resource_dirs: [ |
| 383 | "quickstep/res", |
Hyunyoung Song | 5a007fe | 2021-02-25 00:58:05 -0800 | [diff] [blame] | 384 | ], |
Thiru Ramasamy | d495e8c | 2021-08-26 10:37:17 -0700 | [diff] [blame] | 385 | libs: [ |
| 386 | "framework-statsd", |
| 387 | ], |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 388 | static_libs: [ |
| 389 | "Launcher3ResLib", |
Schneider Victor-tulias | d0865f8 | 2021-11-09 13:19:21 -0800 | [diff] [blame] | 390 | "lottie", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 391 | "SystemUISharedLib", |
Jagrut Desai | fae321c | 2023-10-30 20:30:39 +0000 | [diff] [blame] | 392 | "SettingsLibSettingsTheme", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 393 | ], |
| 394 | manifest: "quickstep/AndroidManifest.xml", |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 395 | min_sdk_version: "current", |
Sunny Goyal | f5c42ea | 2021-03-12 16:00:40 -0800 | [diff] [blame] | 396 | } |
| 397 | |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 398 | // Library with all the source code and dependencies for building Launcher Go |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 399 | android_library { |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 400 | name: "Launcher3GoLib", |
Jordan Silva | 4afa195 | 2024-08-06 16:54:59 +0100 | [diff] [blame] | 401 | defaults: [ |
| 402 | "launcher_compose_defaults", |
| 403 | "quickstep_compose_defaults", |
| 404 | ], |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 405 | srcs: [ |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 406 | ":launcher-src", |
| 407 | ":launcher-quickstep-src", |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 408 | "go/quickstep/src/**/*.java", |
| 409 | "go/quickstep/src/**/*.kt", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 410 | ], |
| 411 | resource_dirs: [ |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 412 | "go/quickstep/res", |
| 413 | ], |
Ben Murdoch | fabc873 | 2021-12-02 18:22:17 +0000 | [diff] [blame] | 414 | // Note the ordering here is important when it comes to resource |
| 415 | // overriding. We want the most specific resource overrides defined |
| 416 | // in QuickstepResLib to take precendece, so it should be the final |
| 417 | // dependency. See b/205278434 for how this can go wrong. |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 418 | static_libs: [ |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 419 | "QuickstepResLib", |
Jon Spivack | 89c21c7 | 2021-08-13 13:18:24 -0700 | [diff] [blame] | 420 | "androidx.room_room-runtime", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 421 | ], |
Jon Spivack | 89c21c7 | 2021-08-13 13:18:24 -0700 | [diff] [blame] | 422 | plugins: ["androidx.room_room-compiler-plugin"], |
Arvind Kumar | 384a0ed | 2023-07-07 09:41:29 +0530 | [diff] [blame] | 423 | manifest: "quickstep/AndroidManifest.xml", |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 424 | additional_manifests: [ |
| 425 | "go/AndroidManifest.xml", |
| 426 | "AndroidManifest-common.xml", |
| 427 | ], |
Sunny Goyal | 1fb271f | 2021-05-20 10:43:23 -0700 | [diff] [blame] | 428 | min_sdk_version: "current", |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 429 | // TODO(b/319712088): re-enable use_resource_processor |
| 430 | use_resource_processor: false, |
Jon Spivack | a65d68b | 2021-04-07 10:22:25 -0700 | [diff] [blame] | 431 | } |
| 432 | |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 433 | // Library with all the source code and dependencies for building Quickstep |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 434 | android_library { |
| 435 | name: "Launcher3QuickStepLib", |
Jordan Silva | 4afa195 | 2024-08-06 16:54:59 +0100 | [diff] [blame] | 436 | defaults: [ |
| 437 | "launcher_compose_defaults", |
| 438 | "quickstep_compose_defaults" |
| 439 | ], |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 440 | srcs: [ |
Thales Lima | 2c54bbf | 2022-07-12 15:45:10 +0000 | [diff] [blame] | 441 | ":launcher-src", |
| 442 | ":launcher-quickstep-src", |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 443 | ":launcher-build-config", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 444 | ], |
Thales Lima | c335ad2 | 2021-11-08 15:31:49 +0000 | [diff] [blame] | 445 | resource_dirs: [], |
Thiru Ramasamy | d495e8c | 2021-08-26 10:37:17 -0700 | [diff] [blame] | 446 | libs: [ |
| 447 | "framework-statsd", |
| 448 | ], |
Ben Murdoch | fabc873 | 2021-12-02 18:22:17 +0000 | [diff] [blame] | 449 | // Note the ordering here is important when it comes to resource |
| 450 | // overriding. We want the most specific resource overrides defined |
| 451 | // in QuickstepResLib to take precendece, so it should be the final |
| 452 | // dependency. See b/208647810 for how this can go wrong. |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 453 | static_libs: [ |
| 454 | "SystemUI-statsd", |
Ben Murdoch | fabc873 | 2021-12-02 18:22:17 +0000 | [diff] [blame] | 455 | "QuickstepResLib", |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 456 | ], |
| 457 | manifest: "quickstep/AndroidManifest.xml", |
| 458 | platform_apis: true, |
| 459 | min_sdk_version: "current", |
Colin Cross | f156b6b | 2024-01-11 14:03:12 -0800 | [diff] [blame] | 460 | // TODO(b/319712088): re-enable use_resource_processor |
| 461 | use_resource_processor: false, |
Sunny Goyal | 4af8cf9 | 2021-07-29 15:48:24 -0700 | [diff] [blame] | 462 | } |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 463 | |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 464 | // Build rule for Quickstep app. |
| 465 | android_app { |
| 466 | name: "Launcher3QuickStep", |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 467 | static_libs: ["Launcher3QuickStepLib"], |
| 468 | optimize: { |
Jordan Silva | 6a8d81a | 2024-07-08 13:29:48 +0000 | [diff] [blame] | 469 | proguard_flags_files: [":launcher-proguard-rules"], |
| 470 | enabled: true, |
| 471 | shrink_resources: true, |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 472 | }, |
| 473 | |
| 474 | platform_apis: true, |
| 475 | min_sdk_version: "current", |
| 476 | target_sdk_version: "current", |
| 477 | |
| 478 | privileged: true, |
| 479 | system_ext_specific: true, |
| 480 | overrides: [ |
| 481 | "Home", |
| 482 | "Launcher2", |
| 483 | "Launcher3", |
| 484 | ], |
| 485 | required: ["privapp_whitelist_com.android.launcher3"], |
| 486 | |
| 487 | resource_dirs: ["quickstep/res"], |
| 488 | |
| 489 | additional_manifests: [ |
| 490 | "quickstep/AndroidManifest-launcher.xml", |
| 491 | "AndroidManifest-common.xml", |
| 492 | ], |
| 493 | |
| 494 | manifest: "quickstep/AndroidManifest.xml", |
| 495 | jacoco: { |
| 496 | include_filter: ["com.android.launcher3.*"], |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 497 | }, |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 498 | |
| 499 | } |
| 500 | |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 501 | |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 502 | // Build rule for Launcher3 Go app with quickstep for Android Go devices. |
| 503 | // Note that the following two rules are exactly same, and should |
| 504 | // eventually be merged into a single target |
| 505 | android_app { |
| 506 | name: "Launcher3Go", |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 507 | static_libs: ["Launcher3GoLib"], |
Sunny Goyal | 3b452f5 | 2024-04-12 19:16:19 +0000 | [diff] [blame] | 508 | resource_dirs: [], |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 509 | |
| 510 | platform_apis: true, |
| 511 | min_sdk_version: "current", |
| 512 | target_sdk_version: "current", |
| 513 | |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 514 | optimize: { |
| 515 | proguard_flags_files: ["proguard.flags"], |
| 516 | enabled: true, |
Jordan Silva | 6a8d81a | 2024-07-08 13:29:48 +0000 | [diff] [blame] | 517 | shrink_resources: true, |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 518 | }, |
| 519 | |
| 520 | privileged: true, |
| 521 | system_ext_specific: true, |
| 522 | overrides: [ |
| 523 | "Home", |
| 524 | "Launcher2", |
| 525 | "Launcher3", |
| 526 | "Launcher3QuickStep", |
| 527 | ], |
| 528 | required: ["privapp_whitelist_com.android.launcher3"], |
| 529 | |
| 530 | additional_manifests: [ |
| 531 | "go/AndroidManifest.xml", |
| 532 | "go/AndroidManifest-launcher.xml", |
| 533 | "AndroidManifest-common.xml", |
| 534 | ], |
| 535 | |
| 536 | manifest: "quickstep/AndroidManifest.xml", |
| 537 | jacoco: { |
| 538 | include_filter: ["com.android.launcher3.*"], |
Cole Faust | bad33e6 | 2023-12-20 11:57:04 -0800 | [diff] [blame] | 539 | }, |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 540 | } |
| 541 | android_app { |
| 542 | name: "Launcher3QuickStepGo", |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 543 | static_libs: ["Launcher3GoLib"], |
Sunny Goyal | 3b452f5 | 2024-04-12 19:16:19 +0000 | [diff] [blame] | 544 | resource_dirs: [], |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 545 | |
| 546 | platform_apis: true, |
| 547 | min_sdk_version: "current", |
| 548 | target_sdk_version: "current", |
| 549 | |
| 550 | optimize: { |
| 551 | proguard_flags_files: ["proguard.flags"], |
| 552 | enabled: true, |
Jordan Silva | 6a8d81a | 2024-07-08 13:29:48 +0000 | [diff] [blame] | 553 | shrink_resources: true, |
Sunny Goyal | 77954ba | 2024-03-25 11:53:17 -0700 | [diff] [blame] | 554 | }, |
| 555 | |
| 556 | privileged: true, |
| 557 | system_ext_specific: true, |
| 558 | overrides: [ |
| 559 | "Home", |
| 560 | "Launcher2", |
| 561 | "Launcher3", |
| 562 | "Launcher3QuickStep", |
| 563 | ], |
| 564 | required: ["privapp_whitelist_com.android.launcher3"], |
| 565 | |
| 566 | additional_manifests: [ |
| 567 | "go/AndroidManifest.xml", |
| 568 | "go/AndroidManifest-launcher.xml", |
| 569 | "AndroidManifest-common.xml", |
| 570 | ], |
| 571 | |
| 572 | manifest: "quickstep/AndroidManifest.xml", |
| 573 | jacoco: { |
| 574 | include_filter: ["com.android.launcher3.*"], |
| 575 | }, |
Thales Lima | 813834a | 2022-05-18 15:29:59 +0000 | [diff] [blame] | 576 | } |