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